Skip to content

Commit

Permalink
Fix an issue where getimagesize could cause page optimization to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
tynanbe committed Dec 19, 2023
1 parent 5f9ad3b commit d361481
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/media.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,11 @@ private function _detect_dimensions($src)
$src = 'https:' . $src;
}

$sizes = getimagesize($src);
try {
$sizes = getimagesize($src);
} catch (\Exception $e) {
return false;
}

if (!empty($sizes[0]) && !empty($sizes[1])) {
return $sizes;
Expand Down

0 comments on commit d361481

Please sign in to comment.