Back to Articles

How to Improve the Largest Contentful Paint (LCP) – Web Core Vital Metrics

By Tony Perez (@perezbox) Posted in: website-performance

In May 2020, Google announced that Core Web Vitals would become a ranking signal (rolling out in 2021). That shifted attention to Page Experience—how fast and stable a page feels for real users. We won’t re-explain every metric here; if you want deep dives, these are great starting points:

  1. Google’s Announcement
  2. Timing for Page Experience
  3. More Details on Page Experience
  4. Smashing Mag: Measuring Core Web Vitals
  5. Search Engine Journal overview

Instead, let’s focus on LCP (Largest Contentful Paint)—what hurts it, what actually moves the needle, and where a CDN helps.

Largest Contentful Paint

Of the three core metrics (LCP, FID/INP, CLS), LCP is where a CDN can have the most impact. FID/INP and CLS lean heavily on your app and front-end code; LCP is largely about making the largest above-the-fold element (often the hero image or a big text block) visible quickly. In practice, LCP tracks when the page becomes useful for the user.

Example of a hero image as a large content element

Most modern pages have a hero image. That’s frequently the LCP element—so image strategy is usually the first lever.

Common LCP Killers We See

  1. Unoptimized images (oversized, no compression, wrong dimensions).
  2. Unused JS/CSS loaded up front (themes/plugins shipping everything on every page).
  3. Slow server responses (uncached pages, slow DB/API calls, cold origins).
  4. Heavy iframes (e.g., YouTube embeds loading on initial paint).

Practical Fixes That Improve LCP

1) Optimize images

Compress and resize. If your hero is 1400px wide, don’t ship 4000px. Consider serving modern formats (WebP/AVIF) where supported.

2) Reserve space with width/height

Avoid late layout reflow and help the browser render faster:

<img src="/img/hero.jpg" width="1400" height="600" alt="...">

3) Serve the right size per device

Use srcset so mobile isn’t downloading desktop-sized assets:

<img
  src="/img/hero-1000w.jpg"
  srcset="/img/hero-600w.jpg 600w, /img/hero-1000w.jpg 1000w, /img/hero-1600w.jpg 1600w"
  sizes="(max-width: 768px) 100vw, 1000px"
  width="1000" height="480" alt="...">

4) Defer third-party and non-critical assets

Inline critical CSS, defer non-critical JS, lazy-load below-the-fold images, and delay heavy embeds (YouTube, maps) until interaction or below the fold. Web.dev has a good primer on render-blocking resources, and many themes let you toggle defer/lazy-load without plugins.

How a CDN Helps LCP

A CDN improves LCP by cutting connection and delivery time. The closer your edge is to the user, the faster the hero assets arrive. If your origin is slow, a CDN can still serve cached HTML (on compatible routes) and always serve static assets fast.

  • Edge caching of static assets (and optionally HTML where safe) reduces TTFB and transfer time.
  • HTTP/2/3 multiplexing and TLS offload at the edge lowers round trips.
  • Image optimization at the edge (if available) automates resizing/compression and next-gen formats.

The exact gain varies by site and where your users are. But consistently, caching and image discipline—plus not blocking rendering with extras—are what move LCP from “needs improvement” to “good”.

NOC — Authoritative DNS, CDN & WAF

Accelerate and protect your sites with global DNS, edge caching, and an always-on web application firewall.

See Plans