Skip to main content

What Is LCP? Google's 2.5 Second Largest Contentful Paint Rule Explained

In this article

Largest Contentful Paint, or LCP, is the time from the moment a visitor requests a page until the largest image or block of text inside their screen has been drawn. It is Google's measure of how long a page feels like it is loading. Google's threshold is 2.5 seconds or under for a good result, judged on real visits at the 75th percentile. So three out of four page loads have to come in under it.

On most business websites the largest element is the hero image at the top of the page or, if there is no image, the main headline. Everything that has to happen before that element appears counts: the server answering, the browser finding the image in the HTML, downloading it, and painting it. A slow LCP is one of those four steps taking too long, and the fix depends on which one.

This post goes deep on that one metric. For the other two Core Web Vitals, and how to read the reports in PageSpeed Insights and Search Console, see our guide to Core Web Vitals thresholds and reports.

Which element counts as the largest

The browser considers a specific set of elements as LCP candidates. They are img elements, images inside inline SVG, the poster frame or first frame of a video, any element with a CSS background image loaded from a file, and block-level elements that contain text. As the page renders, the browser keeps track of the largest candidate drawn so far and updates it whenever something bigger appears. It stops updating the moment the visitor scrolls, taps or presses a key, and the last candidate standing is the LCP element.

A few rules decide the size. Only the part inside the viewport counts, so a tall image that is mostly below the fold is measured by its visible portion. An image that fills the entire viewport is treated as a background and ignored. So is an image with almost no detail in it, such as a flat colour placeholder or a simple gradient. Chrome discounts images that carry very little data per pixel. In practice this means the LCP element is nearly always the real hero photo, a large product image, or the headline text, and never the logo.

What the 2.5 second rule actually means

Google's documentation gives three bands: 2.5 seconds or under is good, 2.5 to 4.0 seconds needs improvement, and over 4.0 seconds is poor. The figure that counts is the 75th percentile of real Chrome visits over the trailing 28 days, measured separately for mobile and desktop. A page whose typical visitor sees the hero in 1.5 seconds but whose slowest quarter of visitors, on older phones and weaker signals, wait 3 seconds, fails. The mobile figure is almost always the worse of the two and the one to work on.

The four parts of an LCP time

Google breaks an LCP time into four phases, and the fix for a slow LCP depends entirely on which phase is slow.

PhaseWhat is happeningTypical cause when slowFix
Time to first byteThe server is working out what to sendSlow queries, no caching, overloaded or distant hostingFaster backend, page caching, UK hosting for UK visitors
Resource load delayThe browser has the HTML but has not started downloading the heroHero set as a CSS background, lazy loaded, or inserted by JavaScriptPut the hero in the HTML as an img with high fetch priority
Resource load durationThe hero file is downloadingFile too large, wrong format, served from far awayRight size, AVIF or WebP, CDN for distant visitors
Element render delayThe file has arrived but the browser has not painted itRender-blocking CSS or scripts, web fonts, client-side renderingDefer non-critical CSS and scripts, swap fonts, render on the server

Google's guidance is that the two delays, load delay and render delay, should be close to zero. The hero should start downloading as soon as the HTML arrives and be painted as soon as it finishes. Most of the budget then goes on the first byte and the download itself, and both of those have direct fixes.

Finding your LCP element and where the time goes

PageSpeed Insights names the LCP element in its lab report and breaks the time into the four phases above. A single run tells you which column of the table you are in. In Chrome DevTools, the Performance panel marks LCP on the timeline and highlights the element when you hover the marker. For real visitor data, Google's web-vitals JavaScript library has an attribution build that reports the element and the phase timings from each visit. That is the only way to see why the 75th percentile is slow when your own laptop shows the page in a second.

Check the LCP element on a phone-sized viewport as well as a desktop one. The layouts differ, and a page whose desktop LCP is the hero image often has a text headline as its mobile LCP, with a different set of fixes.

Fixes, phase by phase

Server response

Nothing can start until the first byte of HTML arrives, so this phase caps everything else. The usual culprits are database queries that run once per item on the page, pages rebuilt from scratch for every visitor, and shared hosting with no spare capacity. Our post on server response time and TTFB covers how to measure it and fix it in Django.

Discovering the image early

The browser's preload scanner reads the HTML ahead of rendering and starts downloads for anything it can see. An img element in the HTML is found immediately. A CSS background image is not found until the stylesheet has downloaded and been applied. An image inserted by JavaScript is not found until the script has downloaded and run. A lazy-loaded image is deliberately held back. Each of these adds a whole round trip or more before the download begins. That is why our post on lazy loading images is so firm about leaving the hero alone.

<img src="/media/hero-1200.avif"
     srcset="/media/hero-600.avif 600w, /media/hero-1200.avif 1200w, /media/hero-1800.avif 1800w"
     sizes="100vw" width="1200" height="675"
     fetchpriority="high" alt="Indoor golf simulator bay">

The fetchpriority attribute tells the browser to put this download ahead of the other images and scripts it has queued. If the hero genuinely has to stay as a CSS background, a preload link in the head gets the download started early. But the img element is the better fix because it also lets you use srcset.

Making the file small

A hero photo exported straight from a camera or a design tool is often several megabytes. The same picture at the width it is actually displayed, saved as AVIF or WebP, is usually a small fraction of that. Generate two or three widths so a phone does not download the desktop version. Our comparison of WebP, AVIF and JPEG XL explains which format suits which picture. The image format tester shows the size of your own hero in each format before you change anything. For visitors a long way from the server, a CDN shortens the download.

Rendering without waiting

The browser will not paint anything until every stylesheet in the head has arrived, and it stops reading the page at any script without defer or async. If the file has downloaded but the paint is late, the fix is to inline the CSS the first screen needs, defer the rest, and defer every script.

When the LCP element is text, the usual delay is a web font: with the default font-display setting the browser can hold the text invisible while the font downloads. Set font-display to swap, preload the one font file the headline uses, or use a system font for the headline. Pages built entirely in the browser by a JavaScript framework have the worst version of this problem. The HTML arrives empty and the hero cannot exist until the framework has loaded and fetched its data. Our post on server-side versus client-side rendering goes into why.

How we handle LCP on our builds

On the business websites we build, we aim for the hero to be an img element in the server-rendered HTML with fetchpriority set, rather than a slider initialised by JavaScript. Where the owner uploads photos, each one can be resized as it is saved and stored as WebP alongside the original, so whoever manages the site can upload a phone photo without thinking about it. The Stamp and Bake shop does this for every product photo. Pages that are the same for every visitor are cached, so the first byte is not waiting on the database.

Before launch we check the LCP element and its four phases on the staging site at phone size. We then check the field data in Search Console once the site has had 28 days of real visitors. The rest of the speed work is covered in our seven-day page speed plan.

Questions people ask

Is LCP the same as page load time?

No. Page load time waits for everything, including scripts and images the visitor cannot see. LCP stops at the moment the largest thing on screen is drawn, because that is when a visitor feels the page has arrived.

What is a good LCP score?

Google's threshold is 2.5 seconds or under at the 75th percentile of real visits, so aim lower than that in the lab.

Why is my LCP good in Lighthouse but poor in Search Console?

Lighthouse is one run on one simulated device. Search Console is 28 days of real visitors, including the slowest quarter. The usual reasons for the gap are a hero that is larger on some pages than the one you tested, a slow first byte at busy times, and visitors on older phones. The web-vitals attribution data tells you which.

Does a hero slider or background video hurt LCP?

Usually. A slider built by JavaScript delays the first slide until the script runs, and a background video's poster frame is often large and loaded late. If you keep either, make the first frame a plain img in the HTML and let the script take over afterwards.

Where to start

Run PageSpeed Insights on your home page with the mobile tab selected, scroll to the LCP element it names, and read the four phase timings beneath it. Whichever phase is largest is the job. If it is the first byte, start with the server. If it is load delay, move the image into the HTML and add fetchpriority. If it is load duration, resize and convert the file. If it is render delay, defer the CSS, scripts and fonts standing in the way. One phase at a time, re-testing after each, is faster than guessing.