summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Avatars
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-03-26 11:54:29 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-29 00:05:04 +0200
commit7cc96c21216a8b00ebc96ee65e560ccc49b3fbe8 (patch)
treef3bb2e51b7fe4044ab972f951e7451663ca89242 /apps/dav/lib/Avatars
parent2a777278975b27836a965d9f53b082bbc0124743 (diff)
downloadnextcloud-server-7cc96c21216a8b00ebc96ee65e560ccc49b3fbe8.tar.gz
nextcloud-server-7cc96c21216a8b00ebc96ee65e560ccc49b3fbe8.zip
Don't output jpeg if we request png
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib/Avatars')
-rw-r--r--apps/dav/lib/Avatars/AvatarNode.php3
1 files changed, 2 insertions, 1 deletions
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();
}