Don't output jpeg if we request png
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
2a77727897
commit
7cc96c2121
|
@ -62,8 +62,9 @@ class AvatarNode extends File {
|
||||||
ob_start();
|
ob_start();
|
||||||
if ($this->ext === 'png') {
|
if ($this->ext === 'png') {
|
||||||
imagepng($res);
|
imagepng($res);
|
||||||
|
} else {
|
||||||
|
imagejpeg($res);
|
||||||
}
|
}
|
||||||
imagejpeg($res);
|
|
||||||
|
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue