From 64d7433a564823e853e3c4f656051dd9543d2a2e Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 7 Jul 2022 14:54:00 +0200 Subject: [PATCH] Thumbnails: crop from original size if 2x is unavailable --- models/Image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/Image.php b/models/Image.php index 212c1dc0..73fa459c 100644 --- a/models/Image.php +++ b/models/Image.php @@ -79,6 +79,8 @@ class Image extends Asset if ((!isset($width) || $this->image_width >= $width * 2) && (!isset($height) || $this->image_height >= $height * 2)) $image_urls[2] = $this->getThumbnailUrl($width * 2, $height * 2, false); + else + $image_urls[2] = $this->getThumbnailUrl($this->image_width, $this->image_height, true); } else $image_urls[1] = $this->getUrl();