From 7cc96c21216a8b00ebc96ee65e560ccc49b3fbe8 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 26 Mar 2017 11:54:29 +0200 Subject: [PATCH] Don't output jpeg if we request png Signed-off-by: Roeland Jago Douma --- apps/dav/lib/Avatars/AvatarNode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Avatars/AvatarNode.php b/apps/dav/lib/Avatars/AvatarNode.php index 17edf80d217..4030f482510 100644 --- a/apps/dav/lib/Avatars/AvatarNode.php +++ b/apps/dav/lib/Avatars/AvatarNode.php @@ -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(); } -- 2.39.5