Overview
LCP (Largest Contentful Paint) is the Core Web Vital for loading speed: the time until the largest visible element in the viewport finishes rendering. Candidates are <img> elements, SVG images, video posters, elements with CSS background images, and block-level text. Good is 2.5 seconds or less, needs improvement is up to 4.0 seconds, and poor is above 4.0, at the 75th percentile of page loads.
Identify which element is the LCP (usually a hero image or the H1) in DevTools or PageSpeed Insights, then fix its path:
- Reduce server response time (TTFB) and use a CDN.
- Do not lazy-load the LCP image; preload it (
<link rel="preload" as="image">) or setfetchpriority="high". - Serve right-sized images in modern formats such as AVIF or WebP.
- Remove render-blocking CSS and JavaScript ahead of the element.
Example
<img src="/hero.avif" alt="Product overview" width="1200" height="600" fetchpriority="high">Related
- core-web-vitals: the metric set LCP belongs to.
- core-web-vitals: optimization checklist.
- image-seo: image formats and sizing rules.
- page-speed: TTFB, FCP, and the wider picture.
- inp: the responsiveness metric, scored separately.
- cls: the stability metric, scored separately.