LCP

On this page 7

LCP (Largest Contentful Paint) is a web performance metric that reports the time from the start of navigation until the largest image, video or text block visible in the viewport is rendered. It approximates the moment a visitor perceives that the main content has loaded, and it is one of the three Core Web Vitals, alongside INP for responsiveness and CLS for visual stability.

A page has good LCP at 2.5 seconds or less, measured at the 75th percentile of real page loads, separately for mobile and desktop. Because it reflects server speed, resource discovery, download time and rendering together, LCP is often the most useful single number for diagnosing a slow page.

How LCP is measured

The browser measures LCP by emitting a largest-contentful-paint entry each time a new, larger content element is painted during page load. The value that counts is the last entry before the user interacts with the page by tapping, scrolling or pressing a key, or before the page is hidden, because later content changes are usually caused by the user rather than by loading.

Size means the visible area inside the viewport, not the intrinsic size: an image clipped by its container or partly off screen counts only for its visible portion, and an upscaled image counts at its intrinsic size if that is smaller. Elements removed from the DOM remain valid candidates if they were painted.

Only certain element types qualify as candidates, as the table shows.

Element typeCounts whenNotes
`img` elementThe first frame of the image is paintedMost common LCP element on content sites
`image` inside SVGThe image is paintedInline SVG shapes alone do not count
`video` poster or first frameThe poster image or first frame is paintedAutoplay video can therefore set LCP
CSS background imageLoaded through url() and paintedHarder for the browser to discover early
Block-level textText nodes in a block element are paintedWeb font swapping can update the entry
Elements that can become the LCP element

Browsers apply heuristics that exclude elements unlikely to be content, such as elements with zero opacity and low-information placeholder images. The exact heuristics are implementation details and have changed over time, so a measured LCP element should always be verified in a trace.

LCP thresholds and the four subparts

LCP results are classified into three bands, and a page passes the Core Web Vitals assessment for this metric only when at least 75% of real visits fall in the good band.

RatingLCP at 75th percentileInterpretation
Good2.5 s or lessMain content appears promptly
Needs improvementAbove 2.5 s up to 4.0 sNoticeable wait, typically on mobile networks
PoorAbove 4.0 sVisitors often abandon or reload
LCP rating bands

For diagnosis, the total time is split into four sequential subparts. Identifying which subpart dominates directs the fix far better than generic advice.

SubpartSpansTypical cause when large
Time to first byteNavigation start to first byte of HTMLSlow server, redirects, no CDN caching
Resource load delayFirst byte to start of the LCP resource downloadLate discovery, lazy loading, low priority
Resource load durationDownload of the LCP resourceOversized image, no modern format, slow network
Element render delayDownload end to the element being paintedRender-blocking CSS or JavaScript, client-side rendering
The four subparts of LCP

As a rough guide, a well-optimized page spends most of its LCP in TTFB and resource download, with load delay and render delay close to zero. When text is the LCP element, the two resource subparts are zero and the remaining time is TTFB plus render delay.

LCP belongs to a family of loading metrics that capture different moments of the same page load. It replaced earlier metrics such as First Meaningful Paint because it is simpler to define and correlates better with perceived loading.

MetricWhat it marksRelationship to LCP
TTFBArrival of the first response byteLower bound and first subpart of LCP
FCPFirst paint of any text or imageAlways at or before LCP
LCPPaint of the largest visible content elementMain perceived-load signal
Speed IndexHow quickly the viewport fills visuallyLab-only; summarizes progress, not one moment
Loading metrics in context

A large gap between FCP and LCP usually means the main image or hero content is discovered or rendered late, while a large TTFB means the problem sits on the server or network, before any front-end optimization can help.

How to improve LCP

Improving LCP means shortening whichever subpart dominates, and the decision table maps common findings to effective fixes.

FindingFixEffect
LCP image has loading="lazy"Remove lazy loading from the hero imageDownload starts immediately
Image discovered late (CSS or JavaScript)Use an img tag or a preload hintEliminates resource load delay
Image competes with other downloadsAdd fetchpriority="high"Browser fetches it first
Large image fileServe AVIF or WebP with srcset and correct sizesShorter download
High TTFBCache HTML at a CDN edge, remove redirectsEvery later subpart starts sooner
Content rendered by JavaScriptUse server-side rendering or static generationRemoves render delay
Matching LCP problems to fixes

Web fonts deserve separate attention when text is the LCP element: preloading the critical font and using font-display: swap or optional prevents invisible text from delaying the paint.

Common mistakes in measuring and optimizing LCP

  • Relying only on lab data. Lab tools run one device and network profile; field data from real users decides the Core Web Vitals assessment.
  • Lazy loading every image, including the hero, which delays the most important download on the page.
  • Optimizing the wrong element. The LCP element differs between mobile and desktop layouts and must be identified per viewport.
  • Hiding content until JavaScript runs, for example with A/B testing scripts that blank the page, which adds render delay to every visit.
  • Ignoring the back/forward cache. Pages restored from it report near-instant LCP, so blocking it removes many fast visits from the distribution.

LCP is not supported in every browser, so field data from browsers without the API is missing; the sample therefore reflects mainly Chromium-based and, more recently, Firefox users.

Understanding it simply

LCP measures how long a visitor waits to see the main thing on a page. That is usually the big photo at the top or the first large block of text. The clock starts when the visitor opens the page. It stops when that main piece appears.

Think of a restaurant. Bread may come quickly, but the meal is what matters. LCP times the meal. A good page shows its main content in two and a half seconds or less, and faster pages keep more visitors.

Applied in practice

A regional travel agency finds that its destination pages have a mobile LCP of 4.6 seconds at the 75th percentile in field data. A trace shows that the LCP element is a full-width hero photo set as a CSS background image, discovered only after the stylesheet loads and delivered as a 900 KB JPEG.

The developers replace the background with an img element using srcset, AVIF files of about 120 KB for phones, and fetchpriority="high". They also remove loading="lazy" from that image and configure the CDN to cache the HTML, which cuts TTFB from 900 ms to about 250 ms.

After four weeks of new field data, mobile LCP settles at about 2.1 seconds, and the pages move into the good band of the Core Web Vitals assessment.