SEO issue explained

Images without width and height

Some images have no width and height in the HTML. The browser cannot reserve space for them, so the page jumps when they load.

A friendly robot examining a web page with a magnifying glass, surrounded by charts and check marks

What this issue means

ROC SEO counts images without width and height attributes under check O9.

Why it matters

When an image has no size, the text below it moves down once it loads. That movement is measured as Cumulative Layout Shift (CLS), one of the Core Web Vitals, and it makes people tap the wrong link.

How to fix it

  1. Add the image's real pixel size: <img src="photo.webp" width="1200" height="800" alt="...">.
  2. Keep it responsive with CSS: img { max-width: 100%; height: auto; }. The browser uses the two numbers for the shape, not the shown size.
  3. For embeds and ads, reserve space with a fixed height or aspect-ratio in CSS.
  4. In WordPress, images inserted from the media library get these attributes automatically; check custom themes and page builders.

Find it on your own site

The free ROC SEO extension checks the page you are on for this and more than 60 other issues, each with a fix, and the site crawler checks up to 1,000 pages for free.

Related issues

Frequently asked questions

Will width and height stop my images from being responsive?

No, as long as your CSS sets max-width: 100% and height: auto. The attributes only tell the browser the shape to reserve.

What is a good CLS score?

0.1 or less is good according to Google. Images and ads without reserved space are the most common causes of a higher score.

Do background images need width and height?

No, CSS background images do not affect layout in the same way. Give their container a fixed size or aspect ratio instead.

Get in touch

Questions, ideas or a partnership?

Write to us about anything: a guest post or publishing on our blog, a partnership, an update you would like to see, a problem with the extension, billing or a refund. A person reads every message and replies by email.

Prefer email? Write to support@getrocseo.com.