NoticeContent
Images Missing Width and Height: How to Fix It
Images have no width and height attributes, so the browser does not know how much space to reserve before they load.
Quick fix: Set width and height attributes on images so the browser reserves space and the layout does not jump while loading (CLS).
Why it matters for SEO
The layout jumps when images appear, which hurts the Cumulative Layout Shift (CLS) score, part of Google's Core Web Vitals.
How to fix it
- 1Add width and height attributes with the image's real pixel size.
- 2Keep images responsive in CSS with max-width: 100%; height: auto;.
- 3Resize and compress large images before uploading.
Example
<img src="/hero.webp" width="1200" height="630" alt="..." style="max-width:100%;height:auto">Free tools to fix it
Resize Image
Change image dimensions to any width and height online.
Compress Image
Reduce JPG, PNG, and WebP image size without losing quality.
Frequently asked questions
Will fixed sizes break my responsive layout?
No. With height: auto in CSS, the browser keeps the ratio and scales the image.
What is a good CLS score?
Below 0.1 is considered good by Google.
Does your website have this issue?
Run a free SEO audit to check this and 40+ other issues in seconds.