]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't output jpeg if we request png 4062/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Sun, 26 Mar 2017 09:54:29 +0000 (11:54 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 28 Mar 2017 22:05:04 +0000 (00:05 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/dav/lib/Avatars/AvatarNode.php

index 17edf80d217bd25d4641e0a19b80105c63647110..4030f482510d1b61e38a4a3cf895d54523f187cb 100644 (file)
@@ -62,8 +62,9 @@ class AvatarNode extends File {
                ob_start();
                if ($this->ext === 'png') {
                        imagepng($res);
+               } else {
+                       imagejpeg($res);
                }
-               imagejpeg($res);
 
                return ob_get_clean();
        }