websitespeed.dev
Blog

How to improve Largest Contentful Paint (LCP)

2026-12-04 · 3 min read

Largest Contentful Paint is the moment the biggest element in the first screen becomes visible. Google's target is 2.5 seconds or less. To fix it, first find out which element it is. A speed test report shows its HTML.

The four parts of LCP

If the server is slow

Add page caching and a CDN. A first byte later than about 0.8 seconds makes a good LCP hard to reach.

If the image starts loading late

The image has to be in the HTML, not inserted by JavaScript or set as a CSS background. Do not lazy-load it, and tell the browser it is important:

<img src="/hero.avif" width="1200" height="600"
     fetchpriority="high" alt="Product photo">

If the download is slow

Serve the image at the size it is displayed, in a modern format such as AVIF or WebP. A 2400 pixel wide photo shown at 800 pixels wastes most of its bytes.

If the element renders late

Render-blocking stylesheets and scripts in the head delay everything. Defer scripts that are not needed for the first screen and keep the CSS small.

See how your site does

Free test with AI fixes written for your platform.

Find your LCP element

More guides