]> git.mxchange.org Git - friendica.git/blobdiff - mod/photo.php
Check for user name in deleted user list and unset account expiration before importin...
[friendica.git] / mod / photo.php
index 93db82a6418c9dc789e9678c7be505340c7330be..497dcd750660ea43722e8b43a8fa3c4e430d9cef 100644 (file)
@@ -106,7 +106,7 @@ function photo_init(&$a) {
                        intval($resolution)
                );
                if(count($r)) {
-                       
+
                        $sql_extra = permissions_sql($r[0]['uid']);
 
                        // Now we'll see if we can access the photo
@@ -169,10 +169,13 @@ function photo_init(&$a) {
                }
        }
 
-       if(isset($customres) && $customres > 0 && $customres < 500) {
+       // Resize only if its not a GIF
+       if ($mime != "image/gif") {
                $ph = new Photo($data, $mimetype);
                if($ph->is_valid()) {
-                       $ph->scaleImageSquare($customres);
+                       if(isset($customres) && $customres > 0 && $customres < 500) {
+                               $ph->scaleImageSquare($customres);
+                       }
                        $data = $ph->imageString();
                        $mimetype = $ph->getType();
                }