Improved Mime Type detection

This commit is contained in:
Michael 2020-04-01 05:42:44 +00:00
parent 248a7fa48a
commit d3722c945b
9 changed files with 89 additions and 102 deletions

View file

@ -432,9 +432,7 @@ class Photo
return false;
}
if (empty($type)) {
$type = Images::guessType($image_url, true);
}
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
$Image = new Image($img_str, $type);
if ($Image->isValid()) {