How to Actually Fix Largest Contentful Paint (LCP)
Everyone tells you to "optimize images" and calls it a day. Real LCP fixes go deeper. Here’s the diagnostic process we use on actual client sites.
Largest Contentful Paint measures one simple thing: how long it takes for the biggest visible element on your page to render. Usually that's a hero image, a banner, or a big headline. Google wants it done in 2.5 seconds or less for 75% of your visitors. Anything over 4 seconds is officially "poor."
Simple to define. Weirdly hard to fix. Because "optimize your images" (the advice you'll find in every recycled blog post) is only one piece of a four-part problem.
LCP is actually four delays stacked on top of each other
This mental model makes slow pages much easier to debug. Your LCP time breaks down into:
1. Time to First Byte (TTFB). How long the server takes to start responding. If your TTFB is 1.8 seconds, you cannot hit a 2.5 second LCP no matter how small your image is. Do the math before touching anything else.
2. Resource load delay. The gap between the HTML arriving and the browser discovering it needs your LCP image. This is the sneaky one. If your hero image is set as a CSS background, or injected by JavaScript, or lazy-loaded, the browser finds it late. Sometimes very late.
3. Resource load time. The actual download. This is where file size, format, and CDN distance matter.
4. Render delay. The image has downloaded but something blocks it from painting. Usually a render-blocking stylesheet or a script that's hogging the main thread.
Run your page through PageSpeed Insights and look at the LCP breakdown in the diagnostics. It tells you which of the four phases eats the most time. Fix the biggest one first. Sounds obvious, but almost nobody does it in that order.
Fixing each phase, in order of what usually helps most
Get the image discovered early
One of the most common LCP mistakes: the hero image is lazy-loaded. Native loading="lazy" on your LCP element is self-sabotage. The browser deliberately waits. Remove it from anything above the fold.
Then go further and tell the browser this image matters:
- Add fetchpriority="high" directly on the hero img tag
- If the image lives in CSS or comes from JavaScript, add a preload link in the head
- Prefer a plain img tag in the HTML over CSS backgrounds for hero sections. The preload scanner finds it immediately.
That one attribute, fetchpriority, can take a noticeable amount off LCP. It costs nothing.
Shrink the download
Now the classic advice, done properly. Serve modern formats: WebP is safe everywhere, AVIF compresses even better and browser support is now solid. Size the image for the actual display size using srcset, because shipping a 2400px image to a 380px phone screen is just waste. Compress at quality 75 to 82; almost nobody can see the difference, and the savings are big.
And put it on a CDN. Physical distance still matters. A visitor in Sydney pulling your hero from a server in Frankfurt pays a real latency tax on every single asset.
Attack TTFB
If your server takes over 800ms to respond, that's your project. Common fixes, roughly in order of bang-for-buck:
- Add full-page caching so repeat requests skip your application entirely
- Upgrade hosting. A $4/month shared plan will always be slow under load, no plugin fixes that
- Use a CDN that caches HTML at the edge, not just images
- Cut slow database queries and bloated middleware. On WordPress, one badly written plugin can add a full second
Clear the render path
Finally, make sure nothing blocks the paint. Inline your critical CSS so above-the-fold styling doesn't wait on a stylesheet download. Add defer to scripts. Kick third-party tags to after load. If you use web fonts for your headline and the headline is your LCP element, use font-display: swap so text renders instantly with a fallback.
A realistic example
Here is an illustrative example: a store with a 5.1 second LCP. The breakdown: 1.2s TTFB, 1.9s load delay, 1.4s load time, 0.6s render delay. The hero was a CSS background image, so the browser found it only after downloading and parsing the entire stylesheet.
We moved it to an img tag with fetchpriority="high", converted it to AVIF (410KB down to 68KB), and turned on page caching. New LCP: 1.9 seconds. Total dev time was maybe five hours. No redesign, no replatforming.
Mistakes that undo good LCP work
A few patterns are common on sites that did "everything right" and still sit at 3.5 seconds:
Preloading too much. Preload is a priority tool, and priorities only mean something when few things have them. Sites that preload eight fonts, three images and two stylesheets have effectively preloaded nothing while delaying everything else. One or two preloads per page, aimed at the LCP resource and maybe your main font. That's it.
A cookie banner that becomes the LCP element. If your consent overlay is the largest thing painted, you're measuring the banner, not the page. Keep it visually modest, or at least make sure the real hero paints before or alongside it.
Slideshows in the hero. Carousels often lazy-render every slide including the first, wait for their JavaScript to initialize, then fade in. That whole dance happens after your budget is spent. If slide one matters, render it as plain HTML and let the script enhance it afterward.
Testing only the homepage. Your money pages are templates: product pages, category pages, articles. Each template has its own LCP element and its own problems. Pull the slowest templates from Search Console's Core Web Vitals report, grouped by URL pattern, and fix template by template instead of polishing the homepage for the fifth time.
Measure the right thing
One last warning. Lab tests (Lighthouse) simulate a single throttled load. Field data (the Chrome UX Report numbers at the top of PageSpeed Insights) reflects your actual visitors over the past 28 days. They often disagree, and Google ranks you on the field data. So treat lab runs as a debugging tool, ship your fixes, then give the field numbers a few weeks to catch up before judging the result.
Get under 2.5 seconds and you're not just pleasing an algorithm. You're inside the window where visitors stop noticing the wait at all. That's the actual prize.
Free tools for this topic
Check your own site in 30 seconds
Run a free SEO audit and see exactly where your pages stand on the issues covered in this article.
Run Free SEO AuditKeep reading
Cumulative Layout Shift: Why Your Page Jumps Around and How to Stop It
You go to tap a link and an ad shoves it down the page at the last second. That’s layout shift, Google measures it, and your site probably has more of it than you think.
INP Is the Core Web Vital Nobody Prepared For (Here’s How to Fix It)
When Google swapped FID for INP in March 2024, sites that passed Core Web Vitals for years suddenly started failing. Here’s why, and what you can actually do about it.