From 4f1b3a1cbf09d63a6e450680bf7a7a6946cdc28e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 2 May 2015 16:54:44 +0200 Subject: l\I\D\imagemagick: Only process images and pdfs Signed-off-by: Florian Pritz --- application/libraries/Image/Drivers/imagemagick.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'application/libraries/Image/Drivers/imagemagick.php') diff --git a/application/libraries/Image/Drivers/imagemagick.php b/application/libraries/Image/Drivers/imagemagick.php index bcd8da40b..ed0c70dc6 100644 --- a/application/libraries/Image/Drivers/imagemagick.php +++ b/application/libraries/Image/Drivers/imagemagick.php @@ -15,7 +15,15 @@ class imagemagick implements \libraries\Image\ImageDriver { public static function get_priority($mimetype) { - return 100; + $mimetype = $mimetype; + $base = explode("/", $mimetype)[0]; + + if ($base == "image" + || in_array($mimetype, array("application/pdf"))) { + return 100; + } + + return -1; } /** -- cgit v1.2.3-24-g4f1b