diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-05-02 16:54:44 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-02 16:54:44 +0200 |
commit | 4f1b3a1cbf09d63a6e450680bf7a7a6946cdc28e (patch) | |
tree | 9410ba616d6da156a31b5f699ac708a706026ad1 /application/libraries/Image | |
parent | f6b9128dfa5aa5fc9654ed74a1a3b78e69263bbf (diff) |
l\I\D\imagemagick: Only process images and pdfs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/Image')
-rw-r--r-- | application/libraries/Image/Drivers/imagemagick.php | 10 |
1 files changed, 9 insertions, 1 deletions
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; } /** |