Performance
PerformanceMedium

Image Dimensions Set

Checks that images have width/height attributes to prevent CLS.

What this check measures

We count <img> tags without width/height attributes. Missing dimensions cause layout shift (CLS) as images load and push content around.

Why it matters

Images without dimensions are the #1 cause of CLS — browser reserves zero space, then jumps when the image loads. Google penalizes sites with CLS > 0.1.

search

How our audit detects it

Count <img> tags missing width or height attributes.

Typical findings

  • error_outlineContent images in a CMS-generated blog have no dimensions.
  • error_outline<img> with only width — browser still calculates height dynamically.

How to fix

Add raw width and height to every <img>. For responsive sizing, combine with CSS `height: auto` and `max-width: 100%`. Next.js Image sets dimensions automatically.

Frequently asked questions

Do I need dimensions on background images?expand_more
CSS backgrounds have no CLS impact (they do not reflow content). Only <img> tags matter.

Want this checked on your site?

Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.

Scan my site

Related checks