Drop using the proxy large size for image preview

- It was causing blurry upscaling with portrait images that have a 640px size preview.
This commit is contained in:
Hypolite Petovan 2023-10-14 15:30:09 -04:00
parent 938b2bae23
commit f19cd54195

View file

@ -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;