Now only resize if supported

This commit is contained in:
Michael 2017-10-21 15:31:31 +00:00
parent 09727024ba
commit 2624abdc35

View file

@ -163,8 +163,8 @@ function photo_init(App $a) {
} }
} }
// Resize only if its not a GIF // Resize only if its not a GIF and it is supported by the library
if ($mimetype != "image/gif") { if (($mimetype != "image/gif") && in_array($mimetype, Photo::supportedTypes())) {
$ph = new Photo($data, $mimetype); $ph = new Photo($data, $mimetype);
if ($ph->is_valid()) { if ($ph->is_valid()) {
if (isset($customres) && $customres > 0 && $customres < 500) { if (isset($customres) && $customres > 0 && $customres < 500) {