Skip to content
atlookup

Image missing Width/Height Attributes

Without explicit width and height, browsers cannot reserve space before the image loads — causing layout shift (CLS), which is a Core Web Vitals ranking factor.

notice Impact: medium IMG_DIMENSIONS_MISSING 2 min read Updated

Why it matters

Without explicit width and height, browsers cannot reserve space before the image loads — causing layout shift (CLS), which is a Core Web Vitals ranking factor.

Address when convenient — notices usually mark a polish opportunity rather than a defect. Estimated SEO impact: medium — measurable effect on click-through or relevance.

How to fix

  • Add width="..." and height="..." to every <img>
  • Use the intrinsic dimensions (aspect ratio is what matters, not px)
  • In CSS, let the image scale with `max-width: 100%; height: auto;`

Common causes

If the rule is firing across many pages, the root cause is almost always one of these:

  • CMS or page builder doesn't enforce alt text at upload time, so editors leave it blank.
  • Bulk-imported product images inherit a generic placeholder (or the filename) as alt.
  • Theme/template renders <img> tags directly from the database without normalising attributes.
  • Lazy-loading or asset pipelines strip optimisation hints during build.

Anti-patterns to avoid

Even with the best intentions, these "fixes" make the issue worse — recognise them so you don't ship them:

  • Putting the filename into alt ("IMG_1234.jpg" tells nobody anything).
  • Stuffing the alt with keywords that don't describe the image.
  • Using the same alt across every product image on a category page.

How atlookup detects this

Our crawler renders each page with a real headless browser, then inspects every <img> and <input type="image"> for the relevant attribute and length thresholds. Pages where the rule fires for image missing width/height attributes are flagged on the report.

If you'd like to see this rule fire on your own site, run a free 60-second audit — every page is reported with the exact lines that triggered it.

Tools to verify the fix

Once you've applied the fix, double-check with these external validators:

  • Lighthouse — Audit images for missing alt, lazy-load, and modern formats.
  • axe DevTools — WCAG-aligned image accessibility check.
  • WAVE — Visual overlay of every alt-related issue per page.

Frequently asked questions

Why does Image Missing Width/Height Attributes matter for SEO?

Without explicit width and height, browsers cannot reserve space before the image loads — causing layout shift (CLS), which is a Core Web Vitals ranking factor.

How do I fix image missing width/height attributes?

Add width="..." and height="..." to every <img> Use the intrinsic dimensions (aspect ratio is what matters, not px) In CSS, let the image scale with `max-width: 100%; height: auto;`

Is this a critical SEO issue?

Address when convenient — notices usually mark a polish opportunity rather than a defect. Estimated SEO impact: medium — measurable effect on click-through or relevance.

How does atlookup detect image missing width/height attributes?

Our crawler renders each page with a real headless browser, then inspects every <code>&lt;img&gt;</code> and <code>&lt;input type="image"&gt;</code> for the relevant attribute and length thresholds. Pages where the rule fires for image missing width/height attributes are flagged on the report.

How long does it take to fix?

5–15 minutes per page. Most teams batch similar issues across templates so the per-page time goes down at scale.