| Rule ID | images/image-file-size |
| Category | Images |
| Scope | Site-wide |
| Severity | error |
| Weight | 7/10 |
Solution
Large images slow down page loads and impact Core Web Vitals. Compress oversized images, use modern formats (WebP/AVIF), and resize images to the display dimensions. Consider responsive images with srcset to serve smaller files on mobile.Options
This rule supports the following configuration options:| Option | Type | Default | Description |
|---|---|---|---|
warn_bytes | number | 204800 (200KB) | Byte size to trigger warning |
error_bytes | number | 1048576 (1MB) | Byte size to trigger error |
Configuration Example
squirrel.toml
Enable / Disable
Disable this rule
squirrel.toml
Disable all Images rules
squirrel.toml
Enable only this rule
squirrel.toml