Skip to content

Images missing width and height attributes

Width and height attributes on image tags tell the browser how much space to reserve for each image before it has finished downloading.

Why this matters

Without these attributes, the browser cannot reserve the correct space, so the page layout shifts as images load, causing text and buttons to jump around. This is measured as CLS (Cumulative Layout Shift), one of Google's Core Web Vitals, and missing image dimensions are a common cause of poor CLS scores.

How to fix it

Add explicit width and height attributes to every image tag on your site. These should match the image's natural dimensions; CSS can still be used to make it responsive.

Turn website findings into an action plan

Create an account to start a Full Audit of your website, with supporting evidence and a prioritised action plan.

Start Full Audit