enable thumbnail cdn for all file thumbnails
This commit is contained in:
parent
05d625484d
commit
a5e9557e4b
1 changed files with 7 additions and 5 deletions
|
@ -6,6 +6,10 @@ import FreezeframeWrapper from './FreezeframeWrapper';
|
|||
import Placeholder from './placeholder.png';
|
||||
import classnames from 'classnames';
|
||||
|
||||
const THUMBNAIL_HEIGHT = 180;
|
||||
const THUMBNAIL_WIDTH = 320;
|
||||
const THUMBNAIL_QUALITY = 100;
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
thumbnail: ?string, // externally sourced image
|
||||
|
@ -42,12 +46,10 @@ 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}&quality=75&height=288&width=512`;
|
||||
url = `${THUMBNAIL_CDN_URL}${thumbnail}&quality=${THUMBNAIL_QUALITY}&height=${THUMBNAIL_HEIGHT}&width=${THUMBNAIL_WIDTH}`;
|
||||
} else if (thumbnail && thumbnail.includes('https://spee.ch')) {
|
||||
url = `${url}?quality=${THUMBNAIL_QUALITY}&height=${THUMBNAIL_HEIGHT}&width=${THUMBNAIL_WIDTH}`;
|
||||
}
|
||||
|
||||
// else if (thumbnail && thumbnail.includes('https://spee.ch')) {
|
||||
// url = `${url}?height=512&width=288`;
|
||||
// }
|
||||
// @endif
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue