mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
Avoid extra redirect with spee.ch images
I'm not sure what's the history behind splitting the logic between speech and non-speech, but currently, doing `${thumbnail}?quality=${quality}&height=${height}&width=${width}` will result in a redirect to `${THUMBNAIL_CDN_URL}s:${width}:${height}/quality:80/plain/${thumbnail}` (hardcoded to 80). That's the same CDN url we use for non-speech, so might as do the same for all images to avoid the redirect.
This commit is contained in:
parent
05f7e55aed
commit
ed2b5ff1d7
1 changed files with 1 additions and 5 deletions
|
@ -19,11 +19,7 @@ export function getThumbnailCdnUrl(props: Props) {
|
|||
return thumbnail;
|
||||
}
|
||||
|
||||
if (thumbnail && !thumbnail.includes('https://spee.ch')) {
|
||||
if (thumbnail) {
|
||||
return `${THUMBNAIL_CDN_URL}s:${width}:${height}/quality:${quality}/plain/${thumbnail}`;
|
||||
}
|
||||
|
||||
if (thumbnail && thumbnail.includes('https://spee.ch')) {
|
||||
return `${thumbnail}?quality=${quality}&height=${height}&width=${width}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue