We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16378c1 commit b2b41ecCopy full SHA for b2b41ec
src/Checks/Performance/ImageSizeCheck.php
@@ -65,10 +65,10 @@ public function validateContent(Crawler $crawler): bool
65
return true;
66
}
67
68
- $image = file_get_contents($url);
+ $imageSize = getRemoteFileSize($url);
69
70
- if (strlen($image) > 1000000) {
71
- $size = bytesToHumanReadable(strlen($image));
+ if ($imageSize > 1000000) {
+ $size = bytesToHumanReadable($imageSize);
72
73
$links[] = $url.' (size: '.$size.')';
74
0 commit comments