From 2ef12896288b535f4ee60aef0a0f4bc0aa3e39ea Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 1 Jan 2023 19:37:07 +0100 Subject: [PATCH] PhotosIndex: enable rendering of more double-density thumbnails --- templates/PhotosIndex.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/PhotosIndex.php b/templates/PhotosIndex.php index c21879cb..2ec9795d 100644 --- a/templates/PhotosIndex.php +++ b/templates/PhotosIndex.php @@ -97,6 +97,8 @@ class PhotosIndex extends SubTemplate // Can we offer double-density thumbs? if ($image->width() >= $width * 2 && $image->height() >= $height * 2) echo ' srcset="', $image->getThumbnailUrl($width * 2, $height * 2, $crop, $fit), ' 2x"'; + else + echo ' srcset="', $image->getThumbnailUrl($image->width(), $image->height(), true), ' 2x"'; echo ' alt="" title="', $image->getTitle(), '">';