What Is LCP? How to Reduce Largest Contentful Paint
What is LCP, which element counts as the LCP element and what is a good value? How to find it, read its four subparts and reduce a high LCP.
LCP (Largest Contentful Paint) is a Core Web Vitals metric that measures when the largest image or text block in the viewport is painted on screen as the page opens. In short, it answers the question “when did the main content appear?”. According to Google, a good LCP value is 2.5 seconds or less.[1] The practical side of the question “what is LCP” is this: first find the LCP element, then shorten the longest of the four parts that make up the time.
I explained where Core Web Vitals sits within technical SEO in my post what is technical SEO, and the order for improving all three metrics together in my guide to improving Core Web Vitals. This post focuses only on LCP. I explain step by step how the metric is calculated, which element counts as LCP, how to find that element and where a high value comes from.
How is LCP calculated?
LCP is the timestamp of the largest content element the browser paints during loading, and it can be updated as loading progresses. When the browser paints the first frame, it records the largest element at that moment as a candidate. If a larger element is painted later, it creates a new candidate entry.[1] The reported LCP is the paint time of the last candidate.
For example, a page first paints the heading text and then a large hero image. The first candidate is the heading. When the image loads and is painted, the candidate moves to the image. That is why LCP extends until the image is painted, even if the page text appears very quickly.
It is important not to confuse LCP with FCP (First Contentful Paint). FCP measures when the first text or image is painted on screen and shows that the page is responding. LCP looks at the largest content element and shows when the main content appears. In the example above, FCP is set by the heading and LCP by the image.
Three rules matter in the calculation:
- Size is measured within the viewport. The part of an element that is off screen or clipped does not count. For resized images, the smaller of the visible size and the intrinsic size is used.[1]
- Interaction stops the measurement. If the user taps, scrolls or presses a key, the browser stops reporting new candidates.[1]
- An element removed from the DOM stays a candidate. Even if an element is removed from the screen or the DOM, it remains the largest element unless a larger one is painted.[1]
The last rule produces surprising results on auto-rotating sliders. If the first slide is a small image and the second slide is larger, LCP can shift to the moment the second slide is painted.
Which elements count as the LCP element?
The element types that can become the LCP element are defined as a limited list in the Largest Contentful Paint API. According to the web.dev guide, the elements that can be candidates are: img elements, image elements inside svg, video elements, elements with a background image loaded with url() and block-level elements containing text.[1] For video, the earlier of the poster image load time and the first frame paint time is used.
Chromium-based browsers exclude some elements by treating them as “non-contentful”. Elements with an opacity of 0, background-like elements that cover the full viewport and low-entropy placeholder images belong to this group.[1] In addition, an svg element itself is not considered a candidate.
Can be an LCP candidate
- img element and the first frame of an animated image
- image element inside svg
- video poster or first frame
- Background image loaded with url()
- Block element containing text (p, h1, div)
Not counted as an LCP candidate
- Invisible element with an opacity of 0
- Background-like element covering the whole screen
- Low-entropy placeholder image
- The svg element itself
- CSS gradient background
For text elements, the smallest rectangle that contains all text nodes is measured. Each text node belongs to its closest block-level ancestor.[1] That is why a long paragraph can be larger than a medium-sized image on the first screen and become the LCP element.
What should a good LCP value be?
Short answer
What should LCP be in seconds?
According to Google’s web.dev guide, LCP should be 2.5 seconds or less for a good user experience. To make sure this target holds for most users, the 75th percentile of page loads is used. Mobile and desktop are evaluated separately, so you need to stay under 2.5 seconds in both device groups.
- Good LCP threshold
- ≤ 2.5 s
- Percentile used in evaluation
- 75th percentile
- Mobile and desktop measured separately
- 2 groups
The 75th percentile means this: LCP has to stay under 2.5 seconds in at least 75 percent of visits. The average is therefore misleading. Fast desktop visits can hide a poor experience on slow phones in the average.
Google Search Central documentation says good Core Web Vitals values align with the experience its search systems aim to reward.[4] The same documentation also states that relevance comes first in ranking. I see LCP not as a ranking lever but as an obstacle that keeps good content from being read.
What are the four subparts of LCP?
The four subparts of LCP are time to first byte (TTFB), resource load delay, resource load duration and element render delay. The web.dev LCP optimization guide explains that every LCP value is the sum of these four parts, with no gaps or overlaps between them.[2] This breakdown turns the diagnosis “LCP is high” into the question “which stage is slow?”.
| Subpart | Start and end | Recommended share |
|---|---|---|
| Time to first byte (TTFB) | From the start of navigation to the first byte of HTML | About 40% |
| Resource load delay | From the first byte to the start of the LCP image request | Less than 10% |
| Resource load duration | Downloading the LCP image | About 40% |
| Element render delay | From the end of the download to the element being painted | Less than 10% |
The shares in the table come from the web.dev guide, which presents them as guidelines rather than strict rules.[2] The logic is simple: the two delay parts involve no network work. If the browser discovers the image early and paints it right away, these two parts approach zero. The remaining time is almost entirely server response and download.
If the LCP element is a text block, the resource load parts are zero. In that case LCP comes down to the sum of TTFB and render delay. A late web font or render-blocking CSS is the most common cause of a slow text LCP.
How is LCP measured and how do you find the LCP element?
Short answer
How is LCP measured?
LCP is measured in two ways: with field data and with lab data. Field data comes from real Chrome users and appears in Search Console and PageSpeed Insights. Lab data is collected with Lighthouse and Chrome DevTools; it is used to find the cause and test a fix right away.
- Find the poor or needs-improvement URL group in the Search Console Core Web Vitals report
- Open a sample URL from the group in PageSpeed Insights and read the field data
- See the element and the subpart breakdown in the LCP element diagnostic of the same report
- Confirm the result by recording a trace with mobile throttling in the Chrome DevTools Performance panel
- Collect real user data with PerformanceObserver or the web-vitals library
I always start measuring with field data, because that is the data Google evaluates. I explained the steps for reading the Search Console report in my post on how to use Google Search Console. Because the report groups URLs into similar pages, it quickly shows the problematic template.
Next, I move to the Chrome DevTools Performance panel. When you record a trace, the LCP marker appears on the timeline and the element is highlighted.[5] Recording with mobile CPU and network throttling reveals problems that do not show up on a desktop computer.
You can also see the LCP element directly in the console. The code below prints every LCP candidate the browser reports:
// Paste into the console and reload the page. The last line is the current LCP element.
new PerformanceObserver((list) => {
const entries = list.getEntries();
const last = entries[entries.length - 1];
console.log('LCP:', Math.round(last.startTime), 'ms', last.element, last.url || '(text)');
}).observe({ type: 'largest-contentful-paint', buffered: true });
The buffered: true option also returns candidates created before the code ran. The url field gives the resource address for image elements and stays empty for text elements.[3] Seeing more than one line during page load is normal; LCP is the last candidate before interaction.
Collecting LCP data from real users
Search Console field data stays at the template level and does not tell you which element causes the problem. Real user monitoring (RUM) closes this gap. Google’s open source web-vitals JavaScript library returns the LCP value and, in its attribution build, the LCP element and the four subparts. You can send these values through the dataLayer to Google Tag Manager and from there to GA4 as an event.
Iframes are another reason field data and lab data differ. The Largest Contentful Paint API does not see elements inside iframes, but the metric counts them as part of the user experience.[1] If an embedded video poster is the LCP element, your own RUM data and CrUX data can differ.
What causes a high LCP?
The cause of a high LCP depends on which of the four subparts takes long, and each subpart has different typical causes. That is why I look at the breakdown first and then go down to the cause.
- If TTFB is long: The problem is on the server. Dynamic pages that hit the database on every request, uncached HTML, redirect chains and servers far from the user are the main causes.
- If resource load delay is long: The browser discovers the image late. Lazy loading the LCP image, adding the image with JavaScript or defining it as a CSS background makes this part longer. The web.dev guide clearly states that the LCP image should not be lazy loaded.[2]
- If resource load duration is long: The image is heavy. Oversized dimensions, an old format (not using AVIF or WebP instead of JPEG) and a missing
srcsetare the leading causes. - If element render delay is long: The image has downloaded but cannot be painted. Render-blocking CSS and JavaScript, long tasks, A/B testing tools that hide the page and code that reveals the element later on the client side make this part longer.
I explained the code-level fix for each cause under the image, font and JavaScript headings in my post on page speed optimization. The short formula is: make the LCP image discoverable in the HTML, give it fetchpriority="high", serve it at the right size and in a modern format, and reduce render-blocking resources.
LCP checklist
When I review a page’s LCP, I check the items below in order. Each item is a state that can be verified with a tool.
Conclusion
LCP measures when the user sees the main content, and a good value is under 2.5 seconds. The way to fix the metric is to find the LCP element correctly first, then shorten the longest of the four subparts. The delay parts should be close to zero; the remaining time should consist of server response and download.
As a next step, check the LCP element of your highest-traffic template with the code above. If you want to review your technical setup together, take a look at my SEO services page, or see my background on the about page.
Key terms
- LCP element
- The LCP element is the HTML element, the largest image or text block painted in the viewport during page load, that determines the LCP time. The browser updates the candidate as larger elements are painted and stops updating once the user interacts.
- Resource load delay
- Resource load delay is an LCP subpart that shows the time between the first byte of the HTML arriving and the request for the LCP image starting. Late discovery of the image, lazy loading and low fetch priority make this time longer.
- Element render delay
- Element render delay is an LCP subpart that shows the time between the LCP resource finishing its download and the element being painted on screen. Render-blocking CSS, long JavaScript tasks and client-side code that reveals the element later make this time longer.
- FCP
- FCP (First Contentful Paint) is a web performance metric that measures when the first text or image content is painted on screen after the page starts loading. FCP shows that the page is responding; LCP measures when the main content appears.
- PerformanceObserver
- PerformanceObserver is a web API that reports performance entries produced by the browser, such as LCP candidates, to JavaScript on the page. It is used with the largest-contentful-paint type to find the LCP element and collect real user data.
Frequently asked questions
What should LCP be in seconds?
According to Google's web.dev guide, LCP should be 2.5 seconds or less for a good experience. This target is measured at the 75th percentile of page loads. Mobile and desktop are evaluated separately, so you need to stay under the threshold in both device groups.
How do you find the LCP element?
The fastest way is the LCP element diagnostic in the PageSpeed Insights report. When you record a trace in the Chrome DevTools Performance panel, the LCP marker also shows the element. You can also run a PerformanceObserver that listens for the largest-contentful-paint type in the console to see the element and its timing.
What is the difference between LCP and FCP?
FCP measures when the first content, meaning any text or image, is painted on the page. LCP measures when the largest content element in the viewport is painted. Even if FCP is early, LCP stays high when the main image arrives late; from the user's point of view, LCP is usually the more meaningful one.
Why is LCP in Lighthouse different from LCP in Search Console?
Lighthouse takes a lab measurement on a single simulated device and connection. Search Console shows field data collected from real Chrome users. Different devices, networks, cache states and elements inside iframes can all make the two results differ.
Does lazy loading make LCP worse?
Yes, if the LCP element is an image and it has lazy loading. The browser postpones the image request until layout is calculated, so the resource load delay grows. Lazy loading should only be used on images outside the first screen.
Sources
The full topic: Technical SEO guide ↗