Glossary

Largest Contentful Paint (LCP)

What is Largest Contentful Paint (LCP)?

Largest Contentful Paint (LCP) is the time from when a visitor starts loading a page until the largest image, text block or video visible in the viewport has rendered. It marks the moment the main content appears, and it is the loading metric among the Core Web Vitals.

How it works

The browser picks the largest element from a short list of candidates:

  • <img> elements, and <image> elements inside an <svg>
  • <video> elements, using the poster image or the first frame, whichever comes first
  • elements with a background image loaded through url()
  • block-level elements that contain text

Chromium-based browsers also leave out elements with an opacity of 0, elements that cover the whole viewport like a background, and low-entropy placeholder images. Only the part of an element inside the viewport counts toward its size.

The largest element can change while the page loads: a headline paints first, then the hero image arrives and takes over. The browser reports a new candidate each time, and stops as soon as the visitor taps, scrolls or presses a key. The last candidate is the page's LCP.

LCP includes everything before that paint, such as redirects, connection setup and the rest of time to first byte. web.dev counts 2.5 seconds or less as good, measured at the 75th percentile of page loads, segmented across mobile and desktop devices. Its article on lab and field data counts more than 4 seconds as poor.

Why it matters

First Contentful Paint records when anything at all appears; LCP records when the main content does. A page can show a logo quickly and still leave the visitor waiting for the thing they came for, and LCP is the number that shows that wait.

What can go wrong

  • The server is slow to send the first byte, and every later step of loading waits for it.
  • Render-blocking resources hold back the first paint, and LCP with it.
  • Text in a web font does not count during the font's block period, so a slow font can push LCP back.
  • A lab run uses one screen size and a cold cache, so it can pick a different LCP element, and a different time, than your visitors get.

Check it

Ranetrace's Lighthouse monitoring records LCP from each scheduled Lighthouse audit, run with the mobile form factor, so you can see when it changed. That is a lab figure. For what visitors measure, use the field data in PageSpeed Insights, which comes from the Chrome User Experience Report, or the web-vitals JavaScript library in your own pages.

Start monitoring today

Websites go down and code throws errors. Ranetrace tells you when it happens to yours, why it matters and what to do next.

Start your 30-day free trial From $9 a month. No credit card required.