Technical SEO

Core Web Vitals: fixing LCP on an image-heavy page

On image-heavy pages, LCP is usually the hero image. Here's how to find what's slowing it down and fix it in the right order.

On an image-heavy page, the Largest Contentful Paint (LCP) element is usually the hero or main product image. To fix a slow LCP, make that image discoverable in the HTML, don't lazy-load it, give it high fetch priority, serve it at the right size and format, and keep the server response fast. The target is an LCP of 2.5 seconds or less for at least 75% of page loads (web.dev). Before changing anything, find out which of LCP's four parts is actually slow. That tells you which fix to start with.

What LCP measures

LCP is the time from when the user starts loading the page until the largest image or text block in the viewport is rendered. On a gallery, a product page or a portfolio, that is almost always an image.

Google uses Core Web Vitals, including LCP, as part of its page experience signals (Google Search Central). I treat it as a user experience metric first. A slow hero image is the first thing a visitor notices.

Field data first, lab data second

There are two kinds of LCP numbers:

  • Field data comes from real Chrome users. You see it in PageSpeed Insights (when there's enough traffic) and in the Core Web Vitals report in Search Console. This is what counts.
  • Lab data comes from a single simulated load in Lighthouse. It's good for debugging, but it doesn't reflect your real users' devices and networks.

I start with field data to confirm there's a real problem and to find which page templates have it. Then I use lab tools to find the cause.

Break LCP into four parts

web.dev splits LCP into four sub-parts (web.dev):

  1. Time to First Byte (TTFB). Until the browser receives the first byte of HTML.
  2. Resource load delay. The gap between TTFB and when the browser starts loading the LCP image.
  3. Resource load duration. How long the image itself takes to download.
  4. Element render delay. The time between the image finishing and it appearing on screen.

Chrome DevTools' Performance panel and PageSpeed Insights both show this breakdown. On image-heavy pages, the biggest problem is often resource load delay: the browser finds the hero image too late.

Six fixes for a slow hero image

The fixes follow the four sub-parts. Start with whichever part is largest on your page.

Fix 1: Make the image discoverable early

The browser can only start fetching an image once it knows the image exists. Common reasons it finds out late:

  • The image is a CSS background-image, so the browser only sees it after the CSS loads.
  • The image is inserted by JavaScript after the page renders, as in many sliders and client-rendered components.
  • The image uses a data-src attribute that a script swaps in later.

Fix: Put the LCP image in the HTML as a normal <img> element with a real src and srcset. If it must be a background image, add a <link rel="preload" as="image"> in the head so the browser fetches it early.

Fix 2: Don't lazy-load the LCP image

loading="lazy" is great for images further down the page. On the hero image it hurts. The browser has to wait for layout to know the image is in view before it starts the download. web.dev covers this in its article on the performance effects of too much lazy loading.

Fix: Remove loading="lazy" from the first image in the viewport. Many CMS themes and image components lazy-load everything by default, so check the rendered HTML, not just your template code.

Fix 3: Raise its priority

Even when the browser finds the image early, it may fetch it at low priority while it's busy with scripts and stylesheets. The fetchpriority="high" attribute tells the browser this image matters most (web.dev).

<img src="/hero-1200.avif"
     srcset="/hero-800.avif 800w, /hero-1200.avif 1200w, /hero-1600.avif 1600w"
     sizes="(min-width: 64rem) 60rem, 100vw"
     width="1200" height="675"
     alt="Living room with oak floor and grey sofa"
     fetchpriority="high">

Use it on one image, the LCP image. If everything is high priority, nothing is.

Fix 4: Send fewer bytes

This shortens the resource load duration:

  • Right size. Use srcset and sizes so a phone doesn't download a desktop-sized image.
  • Modern formats. AVIF or WebP are usually much smaller than JPEG at similar quality. Keep a fallback if you support older browsers.
  • Sensible quality. Hero photos rarely need maximum quality settings.
  • A CDN with image resizing. It serves images from close to the user and can generate sizes on demand.

Fix 5: Don't let layout and scripts block rendering

Sometimes the image arrives quickly but appears late. That's element render delay. Causes include:

  • Render-blocking CSS or JavaScript in the head.
  • A hero slider that hides images until its script runs.
  • A fade-in animation on the hero.

Fix: Inline critical CSS or keep stylesheets small. Defer non-critical scripts. Show the first slide as plain HTML without waiting for the slider script.

While you're there, always set width and height on images. It doesn't change LCP directly, but it prevents layout shift (CLS), another Core Web Vital.

Fix 6: Check the server

If TTFB is a large part of LCP, no image work will fix it. Look at caching, hosting and any slow server-side code. Static or cached HTML usually solves this for content pages.

My order of work

  1. Confirm the problem in field data and find the affected templates.
  2. Identify the LCP element and its four sub-parts.
  3. Fix discovery and lazy-loading first. They're often one-line changes.
  4. Add fetchpriority="high" to the LCP image.
  5. Reduce image size and switch formats.
  6. Remove render-blocking work.
  7. Wait for new field data before calling it done.

Frequently asked questions

What is a good LCP score?

web.dev sets a good LCP at 2.5 seconds or less, measured at the 75th percentile of page loads, separately for mobile and desktop.

Should I preload the hero image?

Only if the browser can't find it early on its own, for example when it's a CSS background or added by JavaScript. If it's already a normal img element in the HTML, fetchpriority="high" is usually enough.

Why does Lighthouse show a different LCP than Search Console?

Lighthouse runs one simulated page load on fixed settings. Search Console shows field data from real Chrome users over time. Use field data to judge the problem and Lighthouse to debug it.

Does lazy loading hurt LCP?

Lazy loading the LCP image does. The browser waits for layout before it starts the download. Lazy loading images below the fold is fine and saves bandwidth.