top of page
  • Writer's pictureBrent Payne

Add dimensions to images

It appears that certain images on the site lack specified width and height attributes in their tags.


Why is this important?

Cumulative Layout Shift (CLS) is a critical metric within Core Web Vitals that influences Google's assessment of 'page experience.' CLS measures the degree of unexpected layout movement during page loading.


Without defined width and height for images, browsers are unable to determine the appropriate space to reserve for them. The result is a visual glitch, a 'jump,' as images trigger unpredictable layout adjustments as they load.


What does the Optimization check?

The Optimization is activated for each internal URL that features image elements lacking specified width and height attributes.


How do you resolve this issue?

Add 'width' and 'height' attributes to your <img> tags to prevent layout shifting. For a responsive design, implement the 'srcset' attribute, defining available images and their dimensions so browsers can allocate space efficiently while preserving the image's aspect ratio.


<img width="800" height="800" src="example-800.jpg" srcset="example-800.jpg 800w, example-1600.jpg 1600w, example-2400.jpg 2400w" alt="Descriptive image text"/>


Further Reading

0 views0 comments

Recent Posts

See All

CSS file size too large discovered in SEO audit

In our SEO audits at Loud Interactive, we often come across a common yet significant issue that can heavily impact your website's loading speed and overall performance: CSS file size too large. Let's

CSS file size too large discovered in SEO audit

When conducting an SEO audit on your site, one issue that might come up is that your CSS file size is too large. But why does this matter, and what can you do about it? Let's dive in. What's the Issue

H1 tag missing or empty" Discovered in an SEO Audit

At Loud Interactive, we've encountered a common issue during our SEO audits that can significantly impact a website's performance on search engines: the "H1 tag missing or empty" warning. This problem

bottom of page