From 396ecafa6c357cf1a70b55e69434006da207e20f Mon Sep 17 00:00:00 2001 From: stsyn Date: Sun, 17 Jan 2021 02:40:28 +0500 Subject: [PATCH] Use even larger thumb if normal size is medium already (#92) --- assets/js/utils/image.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/utils/image.js b/assets/js/utils/image.js index fec1bd2b..7e52eaa7 100644 --- a/assets/js/utils/image.js +++ b/assets/js/utils/image.js @@ -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;