Use even larger thumb if normal size is medium already (#92)

This commit is contained in:
stsyn 2021-01-17 02:40:28 +05:00 committed by GitHub
parent bc5f1af22e
commit 396ecafa6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,9 @@ function showThumb(img) {
if (store.get('serve_hidpi') && !thumbUri.endsWith('.gif')) {
// Check whether the HiDPI option is enabled, and make an exception for GIFs due to their size
imgEl.srcset = `${thumbUri} 1x, ${uris.medium} 2x`;
const x2Size = size === 'medium' ? uris.large : uris.medium;
// use even larger thumb if normal size is medium already
imgEl.srcset = `${thumbUri} 1x, ${x2Size} 2x`;
}
imgEl.src = thumbUri;