]> git.mxchange.org Git - friendica.git/commitdiff
Drop using the proxy large size for image preview
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 14 Oct 2023 19:30:09 +0000 (15:30 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 14 Oct 2023 20:05:01 +0000 (16:05 -0400)
- It was causing blurry upscaling with portrait images that have a 640px size preview.

src/Model/Item.php

index 27359ab2bf89e211ef08894f697d3f367e91ded7..5f83ae38dad2e6f030602c91735fc4e91ab14a59 100644 (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;