Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Lazy-loaded section above the viewport shifting the page: fix

PRF-036Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Lazy loading means the browser waits to fetch an image, video, embed or section until it is close to the screen. That saves data. The problem starts when the lazy item has no reserved size. It begins as a zero-height or tiny box, then expands when its content arrives.

If that box sits above where the visitor is looking, for example while they scroll back up, or in the first screen on a slow connection, the content below it is pushed down. Browsers try to keep your place (this is called scroll anchoring), but it does not always work, so the page can visibly jump. This movement is counted as Cumulative Layout Shift (CLS), a Core Web Vitals score for visual stability.

How a late section moves the page
  1. Page rendersLazy section is an empty box with no height
  2. Visitor scrollsReads text or reaches the form button
  3. Section loadsImage or embed arrives and grows to full height
  4. Content jumpsText and button are pushed down
  5. Mis-tap or exitVisitor loses their place or taps the wrong thing

The section loads after the visitor is already reading or aiming at a button.

Why it costs you leads or sales

A page that jumps feels broken. Visitors lose their place in the offer, miss the form field they were about to click, or tap a different link as the layout moves. The effect is usually small on a fast connection, which is why the business impact is low. It is worse on mobile and slow networks, and it adds to your CLS score, which Google uses as a page experience signal.

Layout shift before and after reserving spaceExample numbers
Layout shift before and after reserving space (example)Before (no reserved height): 0.2 CLS score; After (height reserved): 0 CLS score0010.20Before (no reserved h…After (height reserve…CLS score

Example: illustrative scores only. Google treats 0.1 or below as good.

How to check if your site has it

Find the shifting section
  1. Throttle the network

    Open Chrome DevTools, go to the Network tab and choose Slow 4G. Slow loading makes late shifts easy to see.

  2. Scroll down, then back up

    Load the page, scroll to the middle, then scroll up. Watch for a jump as images or sections above you load.

  3. Record a Performance trace

    In the Performance tab, record while you reload and scroll. Open the Experience row and click each red Layout Shift marker to see which element moved.

  4. Turn on Layout Shift Regions

    In DevTools, open the Rendering panel and tick Layout Shift Regions. Shifted areas flash blue.

  5. Check field data

    Run the URL in PageSpeed Insights and look at the CLS value and the 'Avoid large layout shifts' list, which names the elements involved.

Log layout shifts in the browser consolejavascript
new PerformanceObserver((list) => {
  for (const e of list.getEntries()) {
    if (!e.hadRecentInput) {
      console.log('Shift', e.value.toFixed(4), e.sources.map(s => s.node));
    }
  }
}).observe({ type: 'layout-shift', buffered: true });

How to fix it

The principle is the same everywhere: give the lazy item a known size before it loads, and do not lazy-load anything visible on first paint.

Core fix
  1. Stop lazy-loading the first screen

    Remove loading="lazy" from the hero image and anything visible without scrolling. Use loading="eager" or fetchpriority="high" for the main image.

  2. Add width and height to images

    Set the real pixel dimensions so the browser can calculate the space before the file arrives.

  3. Reserve space for sections and embeds

    Use aspect-ratio for media and min-height for blocks that load later, such as reviews or video.

  4. Use a placeholder of the same size

    If content is injected by script, render a skeleton box of the final height first.

  5. Retest on Slow 4G

    Repeat the scroll-up test and the Layout Shift Regions check.

Image with reserved spacehtml
<img src="/img/feature.jpg" width="1200" height="800" loading="lazy" alt="Product feature" style="height:auto;max-width:100%">
Reserve space for a lazy section or embedcss
.lazy-video { aspect-ratio: 16 / 9; width: 100%; }
.reviews-block { min-height: 420px; }

/* Skipped sections keep an estimated size */
.below-fold-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
Platform-specific steps
  1. Exclude the hero from lazy loading

    WordPress adds loading="lazy" to images by default. Your caching or optimisation plugin (for example in its Lazy Load or Media settings) usually has an option to exclude the first images or skip the first N images. Use it.

  2. Check image dimensions

    Make sure theme and page builder images output width and height attributes. Re-upload or regenerate thumbnails if they are missing.

How to confirm it's fixed

Confirmation checks
  • Scrolling down and back up on Slow 4G no longer makes the page jump.
  • Layout Shift Regions shows no blue flashes after first paint.
  • The console observer logs no shifts from the lazy section.
  • PageSpeed Insights lab CLS is 0.1 or lower.
  • Field CLS improves over the following weeks (Search Console Core Web Vitals report updates slowly).

How to prevent it happening again

Habits that keep it fixed
  • Require width and height, or an aspect ratio, on every new image and embed.
  • Keep the first screen free of lazy loading.
  • Test new sections and plugins on Slow 4G before publishing.
  • Re-run PageSpeed Insights after theme, plugin or page builder updates.
  • Review the Core Web Vitals report in Search Console monthly.
Lazy section behaviour

Before

  • Empty box with no height
  • Grows when content arrives
  • Page jumps, button moves

After

  • Height reserved with aspect-ratio or min-height
  • Content fills the existing space
  • Page stays still

How FunnelGuard handles this

FunnelGuard does not check for this yet. Detecting layout shifts caused by lazy loading is a possible future check, not a current feature.

What FunnelGuard does today is run your real customer journeys on a schedule, such as lead forms, checkouts and booking or chat buttons, and check each step, the tracking hits and whether test leads arrive. If a jumping layout stops the journey from completing, for example a button the robot cannot click, a failed step can show up that way. That is a side effect, not a layout shift check.

To watch for this yourself, run PageSpeed Insights on your key funnel pages after each change, keep an eye on the Core Web Vitals report in Google Search Console, and repeat the Slow 4G scroll test in DevTools. The free read-only website audit and the Free plan (1 site, 2 journeys, daily checks, no card) can help you keep an eye on the journeys themselves.

Questions people ask

Why does my page jump when I scroll up?

Usually an image, embed or section above you had no reserved height and grew when it finally loaded. The content below was pushed down. Add width and height, aspect-ratio or min-height so the space exists before the content arrives.

Does lazy loading cause layout shift?

Only when the lazy item has no reserved size. Lazy loading itself is fine. With width and height attributes or a CSS aspect-ratio, the browser holds the space and nothing moves when the file loads.

Should I lazy-load images above the fold?

No. Images visible on first load, especially the hero, should load eagerly. Lazy loading them delays Largest Contentful Paint and can cause shifts when they appear late.

How do I find which element is causing layout shift?

Record a trace in Chrome DevTools Performance tab and click the Layout Shift markers in the Experience row. You can also tick Layout Shift Regions in the Rendering panel, or check the layout shift list in PageSpeed Insights.

What does content-visibility: auto do for layout shift?

It lets the browser skip rendering off-screen sections. Pair it with contain-intrinsic-size so the skipped section keeps an estimated height. Without that, the scrollbar and scroll position can jump as sections render.

What is a good CLS score?

Google considers 0.1 or lower good, 0.1 to 0.25 needs improvement and above 0.25 poor, measured at the 75th percentile of real visits.

Can FunnelGuard detect lazy-load layout shift?

Not yet. It is a possible future check. FunnelGuard currently checks funnel steps, tracking hits and lead delivery, so use PageSpeed Insights and Search Console to watch CLS.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.