On this page
What this issue is
When a page loads, the browser lays out text first and fetches images afterwards. If the HTML does not say how big an image is, the browser treats it as zero height until the file arrives. Then it pushes everything below it down. That jump is a layout shift.
Cumulative Layout Shift (CLS) is the score Google uses to measure these jumps. A score of 0.1 or less is rated good. Images with no dimensions are one of the most common causes, and one of the easiest to fix.
No dimensions
- Browser reserves 0 px of height
- Headline and form sit high on the page at first
- Image arrives and pushes them down
- Layout shift is recorded
Width and height set
- Browser works out the ratio from the attributes
- Space is reserved before the file loads
- Text and form stay where they are
- No shift from this image
Why it costs you leads or sales
Visitors start reading or reaching for a button as soon as the page appears. If the content moves under their finger, they lose their place or tap the wrong thing. On a landing page, that can be a form field, a link or a banner instead of your call to action.
Shifts also feel untrustworthy on pages that ask for money or personal details. Layout stability is part of Google's Core Web Vitals, so a poor score can also weaken how the page is assessed in search.
- Page starts loadingText appears first
- Hero image arrivesNo reserved space, layout jumps
- Visitor taps buttonButton has moved
- Form or checkoutVisitor may never reach it
The image is the break point. Everything beneath it moves.
Example: illustrative scores for a page with three undimensioned images. Your numbers will differ.
How to check if your site has it
Run PageSpeed Insights
Test the page at pagespeed.web.dev. Look for the audit 'Image elements do not have explicit width and height' and for the 'Avoid large layout shifts' list.
Use Chrome DevTools
Open DevTools, go to the Performance panel, record a page load, and look at the Layout Shifts row in the Experience track. Click a shift to see which element moved.
Throttle the network
In the Network panel, choose Slow 4G, then reload. Slower loading makes the jump easy to see by eye.
Inspect the HTML
Right-click an image, choose Inspect, and check whether the img tag has both width and height, or a CSS aspect-ratio.
How to fix it
Give the browser the image's real pixel size. Modern browsers use the width and height attributes to compute an aspect ratio, then reserve that space even when CSS makes the image fluid.
<img src="hero.jpg" alt="Team at work" width="1200" height="675">
<style>
img {
max-width: 100%;
height: auto;
}
</style>.hero-image {
width: 100%;
aspect-ratio: 16 / 9;
object-fit: cover;
}Use the Media Library
Insert images through the block editor or Media Library. WordPress adds width and height to images it outputs by default.
Check theme and page builder images
Images set as CSS backgrounds, or hard-coded in a theme template, may lack dimensions. Edit the template and add width and height, or set an aspect ratio in the builder's image settings.
Check optimisation plugins
If a performance plugin has a setting to add missing image dimensions, enable it, then clear the cache and retest.
Use image_tag in Liquid
In your theme, replace hand-written img tags with
{{ image | image_url: width: 1200 | image_tag }}, which outputs width and height.Add explicit sizes for custom tags
If you keep a manual tag, add
width="{{ image.width }}" height="{{ image.height }}".Check app-injected images
Review banners and badges added by apps. Contact the app developer if their markup has no dimensions.
Select the image
Webflow adds width and height to images uploaded to the Designer. Check the Settings panel for the image.
Fix background or custom embed images
For custom code embeds, add width and height in the HTML. For div blocks with images, set an aspect ratio in the Style panel's size options.
Use native image elements
Wix sets image sizes for its own image elements. Swap any custom-coded images for native ones where you can.
Fix custom code embeds
In HTML embeds, add width and height to each img tag.
Use image blocks
Image blocks reserve space based on the uploaded file. Check that the block is not set to an unusual crop that your template overrides.
Fix Code blocks
In Code blocks or injected code, add width and height to img tags, or set aspect-ratio in Custom CSS.
Add attributes to every img
Set width and height to the file's intrinsic pixel size, not the displayed size.
Keep CSS responsive
Use
max-width: 100%; height: auto;so the image scales while keeping its ratio.Cover iframes and videos too
Use the aspect-ratio property for other media that loads late.
How to confirm it's fixed
- Reload with Slow 4G throttling and watch that nothing jumps
- Rerun PageSpeed Insights and confirm the dimensions audit passes
- Check the Layout Shifts row in DevTools shows no shift from images
- Test on a real phone and a narrow desktop window
- Clear caches and CDN, then test again
How to prevent it happening again
- Add images through the platform's own image tools, not pasted raw HTML
- Add a check for width and height to your template review
- Tell editors to upload images at the size they will be shown
- Retest key landing pages after theme, plugin or app updates
- Watch the CLS field data in Google Search Console's Core Web Vitals report
How FunnelGuard handles this
FunnelGuard detects this only partly. A robot visitor runs your real customer journeys on a schedule, and it checks CLS on the steps it visits. That tells you when layout shift is high on a funnel step.
It does not list which images are missing width and height, and it does not scan every page of your site for them. A raised CLS score is the signal; finding the exact image is up to you.
To cover the rest by hand, use the steps above: run PageSpeed Insights, open the Layout Shifts row in DevTools to find the element that moved, then add dimensions to that image. A free read-only website audit and a Free plan (1 site, 2 journeys, daily checks, no card) are available if you want to start monitoring.
No dimensions
Leads or data lost
Space is not reserved. The headline and button jump down when the image loads, so CLS rises and visitors may mis-tap.
Toggle the cause to see the effect on the page.
Questions people ask
Why does my page jump when images load?
The browser does not know an image's size until the file downloads, unless the HTML says so. With no width and height, it reserves no space, then pushes content down when the image appears. Adding dimensions fixes it.
Do I need width and height on every image?
Yes, ideally on every img tag, especially images near the top of the page. Set them to the file's real pixel size and keep height: auto in CSS so the image still scales on small screens.
Does adding width and height break responsive images?
No. With max-width: 100%; height: auto; in your CSS, the image scales down while the browser uses the attributes to keep the right aspect ratio and reserve space.
What is a good CLS score?
Google rates a CLS of 0.1 or less as good, 0.1 to 0.25 as needing improvement, and above 0.25 as poor. Images without dimensions can push a page into the higher bands.
How do I find which image is causing layout shift?
Record a page load in Chrome DevTools' Performance panel and open the Layout Shifts row under Experience. Clicking a shift shows the element that moved. PageSpeed Insights also lists images missing dimensions.
Can CSS aspect-ratio replace width and height?
Yes, for cases where you cannot edit the HTML. Setting aspect-ratio: 16 / 9 on the image or its container reserves the space. Attributes on the img tag are still the simplest and most widely supported fix.
Does FunnelGuard tell me which image is shifting?
No. FunnelGuard checks CLS on the funnel steps it visits, so it can flag that layout shift is high. It does not identify images missing dimensions, so you find the culprit with DevTools or PageSpeed Insights.
Related issues
- PRF-025CLS over 0.1 on a funnel stepFix guide
- PRF-029Embeds (YouTube, Instagram, reviews widget) resize after loadFix guide
- PRF-036Lazy-loaded section above the viewport shifts scroll positionFix guide
- PRF-038CTA moves just as user taps it (mis-click onto other element)Fix guide
- PRF-030Web font swap changes text metrics and shifts layoutFix guide
- PRF-027Promo/announcement bar injected at top after loadFix guide