From 996a5c40b1b61cb9ba7d943aa9d0e62cbc1a9f95 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 10 Dec 2020 16:39:12 -0500 Subject: [PATCH] use new cdn for images default to using one in the env --- .env.defaults | 1 + ui/component/fileThumbnail/view.jsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.defaults b/.env.defaults index 975646bac..8180434fc 100644 --- a/.env.defaults +++ b/.env.defaults @@ -14,6 +14,7 @@ WELCOME_VERSION=1.0 # Custom Site info DOMAIN=lbry.tv URL=https://lbry.tv +THUMBNAIL_CDN_URL=https://image-optimizer.vanwanet.com/?address= # UI SITE_TITLE=lbry.tv diff --git a/ui/component/fileThumbnail/view.jsx b/ui/component/fileThumbnail/view.jsx index 1d0bd9d91..a57a5243f 100644 --- a/ui/component/fileThumbnail/view.jsx +++ b/ui/component/fileThumbnail/view.jsx @@ -42,8 +42,12 @@ function FileThumbnail(props: Props) { // @if TARGET='web' // Pass image urls through a compression proxy 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 return (