diff --git a/src/Checks/Performance/ImageSizeCheck.php b/src/Checks/Performance/ImageSizeCheck.php index 8884f75..255099d 100644 --- a/src/Checks/Performance/ImageSizeCheck.php +++ b/src/Checks/Performance/ImageSizeCheck.php @@ -65,10 +65,10 @@ public function validateContent(Crawler $crawler): bool return true; } - $image = file_get_contents($url); + $imageSize = getRemoteFileSize($url); - if (strlen($image) > 1000000) { - $size = bytesToHumanReadable(strlen($image)); + if ($imageSize > 1000000) { + $size = bytesToHumanReadable($imageSize); $links[] = $url.' (size: '.$size.')';