check for og image in config before falling back to default og image

This commit is contained in:
Sean Yesmunt 2021-04-13 15:25:53 -04:00
parent bb766211f9
commit be7ca41235

View file

@ -101,7 +101,8 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) {
if (Number(claim.fee) <= 0 && claim.source_media_type && claim.source_media_type.startsWith('image/')) {
imageThumbnail = generateStreamUrl(claim.name, claim.claim_id);
}
const claimThumbnail = escapeHtmlProperty(claim.thumbnail_url) || imageThumbnail || `${URL}/public/v2-og.png`;
const claimThumbnail =
escapeHtmlProperty(claim.thumbnail_url) || imageThumbnail || OG_IMAGE_URL || `${URL}/public/v2-og.png`;
// Allow for ovverriding default claim based og metadata
const title = overrideOptions.title || claimTitle;