]> git.mxchange.org Git - friendica.git/commitdiff
If a picture was too small it got cropped
authorMichael Vogel <icarus@dabo.de>
Tue, 2 Sep 2014 00:36:04 +0000 (02:36 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 2 Sep 2014 00:36:04 +0000 (02:36 +0200)
include/Photo.php

index fc2ce149c4b62fc6b4e6a065f3a41d15a5ae69b8..580fd25b6af8f4bcd4ce7ed241d40b6460bce666 100644 (file)
@@ -957,11 +957,16 @@ function store_photo($a, $uid, $imagedata = "", $url = "") {
                        $image["thumb"] = $a->get_baseurl()."/photo/{$hash}-3.".$ph->getExt();
        }
 
-       if (isset($image["thumb"]))
-               $image["preview"] = $image["thumb"];
+       // Set the full image as preview image. This will be overwritten, if the picture is larger than 640.
+       $image["preview"] = $image["full"];
 
-       if (isset($image["small"]))
-               $image["preview"] = $image["small"];
+       // Deactivated, since that would result in a cropped preview, if the picture wasn't larger than 320
+       //if (isset($image["thumb"]))
+       //      $image["preview"] = $image["thumb"];
+
+       // Unsure, if this should be activated or deactivated
+       //if (isset($image["small"]))
+       //      $image["preview"] = $image["small"];
 
        if (isset($image["medium"]))
                $image["preview"] = $image["medium"];