PhotosIndex: enable rendering of more double-density thumbnails

This commit is contained in:
Aaron van Geffen 2023-01-01 19:37:07 +01:00
parent 4d05cebc40
commit 2ef1289628

View File

@ -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(), '">';