OG: Skip 'data:image' when generating cards.odysee.com urls

## Issue
513 Meta: Invalid "card.odysee.com" used as thumbnailUrl
This commit is contained in:
infinite-persistence 2021-12-22 22:18:14 +08:00 committed by Thomas Zarebczan
parent e2b8573269
commit 72c1a8ae25

View file

@ -50,7 +50,7 @@ function getThumbnailCdnUrl(url) {
return url;
}
if (url) {
if (url && !url.startsWith('data:image')) {
const encodedURL = Buffer.from(url).toString('base64');
return `${THUMBNAIL_CARDS_CDN_URL}${encodedURL}.jpg`;
}