Add Image Dimensions to Prevent Layout Shift

Web Vitals Analyzer

What is this warning?

Images on your page are missing explicit width and height attributes, which can cause layout shifts as images load. This negatively impacts your Cumulative Layout Shift (CLS) score.

How to Fix This Issue

How to Fix It

The Problem

<img src="photo.jpg" alt="Photo">

The Solution

Add explicit width and height attributes to images.

<img src="photo.jpg" alt="Photo" width="800" height="600">

Why This Works

Explicit dimensions allow the browser to reserve space for images before they load, preventing layout shifts and improving CLS scores.

SEO Impact

This issue can affect your site's search engine rankings and user experience. Addressing it promptly helps ensure optimal performance and visibility in search results.

Automatic Detection

Black SEO Analyzer automatically checks for this warning during site analysis, along with hundreds of other technical SEO issues.

Ready to Unlock Your Site's Full SEO Potential?

Choose the license that fits your needs and start getting the deep, actionable insights you deserve.