In short
LCP (Largest Contentful Paint) measures when the largest element visible on screen, an image or a block of text, finishes rendering. Google rates it good when it stays at 2.5 seconds or less for at least 75% of visits, on mobile as well as desktop. The method has three stages: find the LCP element of each template, identify which of its four phases is slow, then work on that phase and no other.
Why it matters
LCP is the metric that comes closest to the visitor's question: “has the page loaded?”. Until the main image or the heading appears, the page looks empty.
The browser can only display this element after a chain of events, split into four phases:
- TTFB (Time to First Byte): time until the first byte of the HTML.
- Resource load delay: time between that first byte and the start of the LCP image download.
- Resource load duration: download of the image itself.
- Element render delay: time between the end of the download and the element actually being displayed.
When the LCP element is text, only the first and last phases exist. Reducing the weight of an image whose problem is being discovered too late changes almost nothing: hence the importance of the diagnosis.
What it improves
- Core Web Vitals LCP is one of the three, often the hardest to pass on mobile.
- Perceived speed The main content appears sooner and abandonment during loading drops. The size of the effect depends on the site: measure it on your own conversions.
- Rankings A real but modest effect. Core Web Vitals separate pages of similar relevance; they do not make up for weaker content.
- Generative engines No documented effect of LCP on citations.
How to check
The verdict comes from field data: the top block of PageSpeed Insights, the Search Console “Core Web Vitals” report or CrUX Vis. See analyze real-user CrUX data (opens in a new tab). Compliant result: LCP p75 of 2.5 s or less on mobile.
To find a page's LCP element, paste this into the browser console:
new PerformanceObserver((liste) => {
const entrees = liste.getEntries();
const derniere = entrees[entrees.length - 1];
console.log('LCP:', Math.round(derniere.startTime), 'ms', derniere.element);
}).observe({ type: 'largest-contentful-paint', buffered: true });
The “Performance” panel in Chrome DevTools shows the same information, with the duration of each of the four phases. The Lighthouse report also gives it in its diagnostic dedicated to the LCP breakdown.
How to implement
Step 1 — Identify the LCP element of each template
Note the LCP element on one URL per template, at mobile width and then desktop width: it often differs. Common cases: header image, first product image, H1 heading, first paragraph, consent banner.
Good to know: if the LCP element is the cookie banner, your real visitors do not have the same LCP as Lighthouse. See test before and after cookie consent (opens in a new tab).
Step 2 — Measure the four phases
Record a page load in the “Performance” panel with CPU and network throttling, then read the breakdown.
| Slow phase | Symptom | Lever |
|---|---|---|
| TTFB | The HTML arrives late | Page cache, server, CDN (content delivery network) |
| Load delay | The image starts well after the HTML | Make the image discoverable, high priority |
| Load duration | The image takes a long time to arrive | Format, dimensions, compression, CDN |
| Render delay | The image has arrived but is not displayed | Render-blocking CSS and JavaScript, client-side rendering |
On a well-tuned page, most of the time is split between TTFB and the resource download; the two delays should stay close to zero.
Reduce TTFB
Nothing is displayed before the HTML. If TTFB exceeds 800 ms, start there: target TTFB ≤ 800 ms (opens in a new tab), configure browser and server caching (opens in a new tab), optimize hosting and CDN (opens in a new tab). Also remove redirects ahead of the page: see fix redirect chains (opens in a new tab).
Make the LCP resource discoverable from the HTML
The browser finds resources by reading the HTML before it even executes anything. An LCP image escapes this discovery when it is declared as a background-image in CSS, injected by JavaScript, loaded with loading="lazy" or referenced through a data-src attribute.
Target: an img tag present in the initial HTML, without lazy loading, with high priority.
<img src="/images/hero-1200.avif"
srcset="/images/hero-800.avif 800w, /images/hero-1200.avif 1200w, /images/hero-1600.avif 1600w"
sizes="100vw"
width="1600" height="800"
alt="Image description"
fetchpriority="high">
If the image must remain a CSS background, preload it in the head:
<link rel="preload" as="image" href="/images/hero-1200.avif"
imagesrcset="/images/hero-800.avif 800w, /images/hero-1200.avif 1200w, /images/hero-1600.avif 1600w"
imagesizes="100vw" fetchpriority="high">
Details in optimize the LCP image without lazy loading (opens in a new tab) and preload only critical resources (opens in a new tab).
Reduce the resource load duration
- Serve a modern format: WebP or AVIF (opens in a new tab).
- Match the size to the screen with
srcsetandsizes(opens in a new tab): a phone should not download the image intended for a desktop screen. - Compress images (opens in a new tab).
- Serve the image from the same domain as the page or from a CDN that is already connected: connecting to a new domain costs a DNS lookup and a TLS handshake.
- Give it a long cache lifetime for subsequent visits.
Reduce the render delay
The image has been downloaded, but the browser is waiting for something else before painting:
- stylesheets or synchronous scripts in the
head: reduce render-blocking resources (opens in a new tab); - JavaScript keeping the main thread busy: defer non-essential scripts (opens in a new tab);
- content generated in the browser: prefer server-side or static rendering (opens in a new tab);
- an A/B testing tool that hides the page while it initializes;
- a reveal animation (opacity at zero, then fade-in) on the main element.
When the LCP element is text
Text depends on the HTML, the CSS and the font. Apply font-display: swap or optional, preload the heading font if it is essential and host it on your own domain: optimize fonts (opens in a new tab).
Cloudflare
Versions Cloudflare dashboard, all plans (Polish: paid plans), November 2026.
Two settings affect LCP, found on the Speed > Settings page of the dashboard:
- Early Hints (“Content Optimization” tab): Cloudflare sends a 103 response with your page's
Link: rel=preloadheaders while the origin prepares the HTML. Only useful if your server emits these headers for the LCP image or the main CSS. - Polish (“Image Optimization” tab) and image resizing (paid plans): conversion to WebP or AVIF at the edge.
Caching HTML at the edge remains the strongest lever: see the check on caching.
WordPress
Versions WordPress 6.3 to 7.1.
Since version 6.3, WordPress itself adds fetchpriority="high" to the image it considers to be the LCP element and does not apply lazy loading to the first images in the content. Check the HTML it produces: page builders, sliders and background images often bypass this mechanism.
In a theme, for a header image:
echo wp_get_attachment_image($imageId, 'full', false, [
'fetchpriority' => 'high',
'loading' => false,
'sizes' => '100vw',
]);
On the plugin side: exclude the main image from your optimization plugin's lazy loading (WP Rocket, LiteSpeed Cache and Perfmatters offer a setting for this) and avoid sliders at the top of the page.
Shopify
Versions Online Store 2.0 themes, November 2026.
In theme sections, use the image_tag filter, which generates srcset, width and height:
{{ section.settings.image
| image_url: width: 1600
| image_tag: loading: 'eager', fetchpriority: 'high', widths: '800, 1200, 1600', sizes: '100vw' }}
For reusable sections, decide how to load based on position: section.index is 1 for the first section of the page. Reserve eager and high priority for the first one, and lazy for the following ones.
Next.js
Versions Next.js 13 to 16.
The next/image component lazy-loads images by default. If preloading is not needed, loading="eager" with fetchPriority="high" is enough for the LCP image, whatever the version.
Next.js 16
The preload prop inserts a <link rel="preload"> into the <head>:
import Image from 'next/image';
import hero from './hero.jpg';
export default function Hero() {
return <Image src={hero} alt="Image description" sizes="100vw" preload />;
}
The priority prop has been deprecated since Next.js 16: replace it with preload.
Next.js 13 to 15
The preload prop does not exist yet: use priority.
import Image from 'next/image';
import hero from './hero.jpg';
export default function Hero() {
return <Image src={hero} alt="Image description" sizes="100vw" priority />;
}
Common mistakes
- Leaving
loading="lazy"on the main image: the browser waits until it has computed the layout before requesting it. - Putting
fetchpriority="high"everywhere: giving priority to everything gives it to nothing. One image per page. - Preloading the image without
imagesrcset: the browser downloads two variants, the preloaded one and the one fromsrcset. - Putting a slider at the top of the page: several large images, JavaScript, and an unpredictable LCP element.
- Optimizing the image when TTFB is the cause: saving 100 ms on an image does not make up for HTML that arrives after two seconds.
- Relying on the LCP element seen on desktop: on mobile, it is often a different element.
- Ignoring client-side rendering: if the initial HTML is empty, no image optimization will make up for the JavaScript execution time.
Frequently asked questions
What is the right LCP threshold?
Google rates LCP as good when it stays at 2.5 seconds or less for at least 75% of visits, assessed separately on mobile and desktop. Between 2.5 and 4 seconds, it needs improvement; above 4 seconds, it is poor. The verdict comes from CrUX field data, visible in PageSpeed Insights, Search Console or CrUX Vis, not from a lab test.
How do I find out why my LCP is slow?
First identify the LCP element of each template, then measure its four phases in the Chrome Performance panel: TTFB, resource load delay, resource load duration and element render delay. The longest phase points to the lever: cache and server for TTFB, image discovery and priority for the load delay, image weight or blocking resources for the last two.
Does LCP affect SEO?
A real but modest effect. Core Web Vitals, including LCP, separate pages of similar relevance; they do not make up for weaker content. No effect of LCP on generative engine citations is documented. The most direct benefit is for visitors: the main content appears sooner and abandonment during loading drops, to an extent you should measure on your conversions.
Why is optimizing the image not always enough to improve LCP?
Because the image's weight only affects one of the four phases. If the HTML arrives after two seconds, saving 100 milliseconds on the image changes almost nothing: TTFB needs fixing. If the image is discovered late, because of lazy loading, a CSS background or a script, its discovery is what needs fixing. And if the initial HTML is empty, client-side rendering is the cause.
Resources
- web.dev: Largest Contentful Paintweb.dev
- web.dev: Optimize LCPweb.dev
- web.dev: The fetchpriority attributeweb.dev
- Google Search Central: Core Web Vitals and Google search resultsdevelopers.google.com
- MDN: rel="preload"developer.mozilla.org
- Cloudflare: Early Hintsdevelopers.cloudflare.com
- Shopify: image_tag filtershopify.dev
- Next.js: Image componentnextjs.org
Updated on
Topic checklist (PDF)