From 68149d99310a3e3d7881f8673856e5ed92a71168 Mon Sep 17 00:00:00 2001 From: Abbe98 Date: Wed, 29 Mar 2023 07:03:15 +0200 Subject: [PATCH] allow lossy rendering of thumbnails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ´lossy´ parameter just states if lossy rendering is allowed or not so it's safe to add it to all thumb.php requests. The change should solve rendering issues for JPEG, PNG, TIFF, and possibly other formats. --- module/scripts/project/thumbnail-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/scripts/project/thumbnail-renderer.js b/module/scripts/project/thumbnail-renderer.js index 1dca4d9..0dd9e50 100644 --- a/module/scripts/project/thumbnail-renderer.js +++ b/module/scripts/project/thumbnail-renderer.js @@ -120,7 +120,7 @@ class ThumbnailReconRenderer extends ReconCellRenderer { See https://www.mediawiki.org/wiki/Requests_for_comment/Standardized_thumbnails_sizes */ getThumbnailUrl(mediaWikiRootUrl, bareFileName, width) { - return `${mediaWikiRootUrl}w/thumb.php?f=${encodeURIComponent(bareFileName)}&w=${width}&h=${width}`; + return `${mediaWikiRootUrl}w/thumb.php?f=${encodeURIComponent(bareFileName)}&w=${width}&h=${width}&lossy=lossy`; } }