From f19cd54195b8d5395bc221734890ee654212dfe5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 14 Oct 2023 15:30:09 -0400 Subject: [PATCH] Drop using the proxy large size for image preview - It was causing blurry upscaling with portrait images that have a 640px size preview. --- src/Model/Item.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 27359ab2bf..5f83ae38da 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3483,11 +3483,8 @@ class Item continue; } - if ($PostMedia->mimetype->type == 'image') { - $preview_size = $PostMedia->width > $PostMedia->height ? Proxy::SIZE_MEDIUM : Proxy::SIZE_LARGE; - $preview_url = DI::baseUrl() . $PostMedia->getPreviewPath($preview_size); - } elseif ($PostMedia->preview) { - $preview_size = Proxy::SIZE_LARGE; + if ($PostMedia->mimetype->type == 'image' || $PostMedia->preview) { + $preview_size = Proxy::SIZE_MEDIUM; $preview_url = DI::baseUrl() . $PostMedia->getPreviewPath($preview_size); } else { $preview_size = 0;