use new cdn for images

default to using one in the env
This commit is contained in:
Sean Yesmunt 2020-12-10 16:39:12 -05:00
parent b86f748700
commit 996a5c40b1
2 changed files with 6 additions and 1 deletions

View file

@ -14,6 +14,7 @@ WELCOME_VERSION=1.0
# Custom Site info # Custom Site info
DOMAIN=lbry.tv DOMAIN=lbry.tv
URL=https://lbry.tv URL=https://lbry.tv
THUMBNAIL_CDN_URL=https://image-optimizer.vanwanet.com/?address=
# UI # UI
SITE_TITLE=lbry.tv SITE_TITLE=lbry.tv

View file

@ -42,8 +42,12 @@ function FileThumbnail(props: Props) {
// @if TARGET='web' // @if TARGET='web'
// Pass image urls through a compression proxy // Pass image urls through a compression proxy
if (thumbnail && THUMBNAIL_CDN_URL && !thumbnail.includes('https://spee.ch')) { if (thumbnail && THUMBNAIL_CDN_URL && !thumbnail.includes('https://spee.ch')) {
url = `${THUMBNAIL_CDN_URL}${thumbnail}`; url = `${THUMBNAIL_CDN_URL}${thumbnail}&quality=75&height=288&width=512`;
} }
// else if (thumbnail && thumbnail.includes('https://spee.ch')) {
// url = `${url}?height=512&width=288`;
// }
// @endif // @endif
return ( return (