Largest Contentful Paint: measuring and optimizing main content load speed

Home / Everything About / Everything About Analytics / Largest Contentful Paint: measuring and optimizing main content load speed

LCP measures time until main content loads. Main content is largest text block or image on page. For most pages, LCP is critical metric because it determines when page becomes useful to user.

User lands on page. Page starts loading. Browser downloads HTML. Browser downloads CSS. Browser downloads JavaScript. HTML renders. CSS applies styles. JavaScript runs. Main content appears. This is LCP.

LCP of one second is excellent. User sees content fast. LCP of three seconds is slow. User waits. LCP of five seconds is very slow. User leaves.

What counts as Largest Contentful Paint

Largest element on page above fold. Usually image or headline. Example: homepage with hero image. Hero image is largest element. Hero image appearance time is LCP.

Example: blog article with headline. Headline is largest element. Headline appearance time is LCP.

Example: product page with product image. Product image is largest element. Product image appearance time is LCP.

LCP is measured from when user clicks link (start of page load) until largest element appears. Includes time to download HTML, CSS, JavaScript, download image, render page.

Optimizing LCP

Optimization target: LCP under two point five seconds.

Strategy one: optimize server response time (TTFB). Faster server means HTML arrives faster. HTML arrival is prerequisite for rendering. Reduce TTFB by improving server, using CDN, reducing database queries.

Strategy two: reduce CSS file size. Smaller CSS downloads faster. CSS must download before page renders. Reduce CSS by removing unused styles, minifying, deferring non-critical CSS.

Strategy three: reduce JavaScript file size. Large JavaScript delays execution and rendering. Reduce JavaScript by removing unused code, splitting large files, deferring non-critical JavaScript.

Strategy four: optimize images. Images are often largest elements (LCP). Reduce image file size by compressing, using modern formats (WebP), reducing image dimensions.

Strategy five: preload critical resources. Tell browser to download critical image or font early. Image downloads in parallel with HTML and CSS. Reduces LCP.

Real example: blog article LCP optimization

Baseline LCP: two point eight seconds.

Analysis: article hero image is largest element. Image is two megabytes. Takes one point two seconds to download. Image download is bottleneck.

Optimization

Compress image: reduce from two megabytes to zero point five megabytes. Download time is now zero point three seconds.

Convert to WebP format: further reduce to zero point three megabytes. Download time is now zero point one seconds.

Preload image: tell browser to download image early. Image downloads in parallel with HTML. Saves zero point two seconds.

Move critical CSS above fold: reduce time until page can render. Saves zero point three seconds.

New LCP: one point seven seconds.

Two point eight minus one point two (image download) plus zero point one (compressed image download) equals one point seven seconds. Below target of two point five.

LCP and different page types

Homepage

Hero image is usually LCP. Optimize by compressing image, using CDN, preloading.

Blog article

Headline or first image is LCP. Optimize by reducing CSS/JavaScript delay, preloading fonts.

Product page

Product image is LCP. Optimize by compressing image, responsive images for different devices.

Checkout page

Form or button is LCP. Optimize by reducing CSS/JavaScript, preloading critical resources.

Different page types have different optimization strategies. Know what your LCP element is. Optimize that element.

LCP and mobile vs desktop

Mobile LCP is usually slower than desktop LCP. Mobile network is slower. Mobile devices have less processing power.

Baseline desktop LCP: one point five seconds. Baseline mobile LCP: three seconds.

Mobile is twice as slow. Mobile users experience slowness more acutely.

Optimize mobile first. Focus on reducing image size (mobile bandwidth is limited). Reduce JavaScript (mobile devices parse slower). Use mobile-friendly formats.

Measuring LCP improvement

Baseline LCP

Measure before optimization.

Implement optimization

New LCP

Measure after optimization.

Improvement

Baseline minus new LCP.

Example

Baseline two point eight seconds. After optimization one point seven seconds. Improvement is one point one seconds.

Calculate impact

One point one second improvement might increase conversion rate by one percent (depending on baseline and industry). For fifty thousand monthly visitors, that is five hundred additional conversions at one hundred dollars order value. Fifty thousand dollars monthly. Six hundred thousand dollars annually.

Compare to cost of optimization. If cost is fifty thousand dollars, payoff is one month. Excellent ROI.

Frequently asked questions

How do we know what element is our LCP?

Should we optimize LCP for all pages or just homepage?

Is preloading always helpful for LCP?

How do we optimize LCP when main content is dynamic (loaded from API)?

Should we use lazy loading for LCP element?

How does LCP differ from FCP (First Contentful Paint)?