diff --git a/src/Checks/Content/AltTagCheck.php b/src/Checks/Content/AltTagCheck.php index d5248a2..57671dd 100644 --- a/src/Checks/Content/AltTagCheck.php +++ b/src/Checks/Content/AltTagCheck.php @@ -100,7 +100,14 @@ private function getImageDimensions(string $src, Crawler $node): array ]; } - $dimensions = getimagesize($src); + $dimensions = @getimagesize($src); + + if ($dimensions === false) { + return [ + 'width' => 0, + 'height' => 0, + ]; + } return [ 'width' => $dimensions[0],