Images without width and height
Medium priorityImages
Images don’t declare width and height, so the page jumps around as they load.
What triggers this issue
- One or more images are missing a
widthorheightattribute.
Why it matters
Without dimensions, the browser can’t reserve space for an image until it downloads, so text shifts down when it appears. That shift is measured as Cumulative Layout Shift, a Core Web Vital Google uses for ranking.
How to fix it
- Add
widthandheightattributes with the image’s intrinsic size; CSS likemax-width: 100%; height: autokeeps it responsive. - Alternatively, set a CSS
aspect-ratioon the image or its container.
<img src="photo.jpg" alt="…" width="1200" height="800" style="max-width:100%;height:auto">