re-enable pathinfo() check and try with getimagesize() if we have not got a result

This commit is contained in:
Mario Vavti 2015-10-28 21:52:56 +01:00
parent f1a3b281d4
commit e0a75f68d5

View File

@ -541,17 +541,16 @@ function guess_image_type($filename, $headers = '') {
// we aren't using imagick can find it
}
}
/*
if(is_null($type)) {
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$ph = photo_factory('');
$types = $ph->supportedTypes();
$type = "image/jpeg";
foreach ($types as $m=>$e){
if ($ext==$e) $type = $m;
}
}
*/
if(is_null($type)) {
$size = getimagesize($filename);
$ph = photo_factory('');