Checks for width/height attributes (prevents CLS)Documentation Index
Fetch the complete documentation index at: https://docs.squirrelscan.com/llms.txt
Use this file to discover all available pages before exploring further.
| Rule ID | images/dimensions |
| Category | Images |
| Scope | Per-page |
| Severity | warning |
| Weight | 4/10 |
Solution
Specifying width and height attributes prevents Cumulative Layout Shift (CLS) by reserving space before images load. Add width and height attributes to img tags matching the image’s intrinsic dimensions. Use CSS for responsive sizing if needed. For responsive images, the aspect ratio from width/height prevents layout shifts even when CSS overrides the actual size.Enable / Disable
Disable this rule
squirrel.toml
Disable all Images rules
squirrel.toml
Enable only this rule
squirrel.toml