Don't output jpeg if we request png

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-03-26 11:54:29 +02:00
parent 2a77727897
commit 7cc96c2121
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 2 additions and 1 deletions

View 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();
}