only use compression proxy on lbry.tv
This commit is contained in:
parent
6f9c9d2052
commit
5ba871cd21
1 changed files with 9 additions and 1 deletions
|
@ -17,11 +17,19 @@ class CardMedia extends React.PureComponent<Props> {
|
|||
return <FreezeframeWrapper src={thumbnail} className={className} />;
|
||||
}
|
||||
|
||||
const url = thumbnail
|
||||
let url;
|
||||
// @if TARGET='web'
|
||||
// Pass image urls through a compression proxy
|
||||
url = thumbnail
|
||||
? 'https://ext.thumbnails.lbry.com/400x,q55/' +
|
||||
// The image server will redirect if we don't remove the double slashes after http(s)
|
||||
thumbnail.replace('https://', 'https:/').replace('http://', 'http:/')
|
||||
: Placeholder;
|
||||
// @endif
|
||||
// @if TARGET='app'
|
||||
url = thumbnail || Placeholder;
|
||||
// @endif
|
||||
|
||||
return <div style={{ backgroundImage: `url('${url.replace(/'/g, "\\'")}')` }} className={className} />;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue