From 2624abdc35491ff2fc48568bb8258b82733ccf81 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Oct 2017 15:31:31 +0000 Subject: [PATCH] Now only resize if supported --- mod/photo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/photo.php b/mod/photo.php index 1a814f5ef..e22380830 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -163,8 +163,8 @@ function photo_init(App $a) { } } - // Resize only if its not a GIF - if ($mimetype != "image/gif") { + // Resize only if its not a GIF and it is supported by the library + if (($mimetype != "image/gif") && in_array($mimetype, Photo::supportedTypes())) { $ph = new Photo($data, $mimetype); if ($ph->is_valid()) { if (isset($customres) && $customres > 0 && $customres < 500) {