How to Fix LCP: Hero Images, Fonts, and Server Response
Learn the diagnostic sequence and implementation fixes that move Largest Contentful Paint from red to green by tackling hero images, web fonts, and server response time.
Google’s own data shows that pages meeting the 2.5-second Largest Contentful Paint threshold retain measurably more visitors than those that do not. Yet most LCP failures share just three root causes: oversized hero images, render-blocking web fonts, and slow server response. Fixing LCP is not about guessing. It is about running the right diagnostic sequence, isolating the bottleneck, and applying targeted fixes in the correct order.
Get a practitioner-led audit that pinpoints exactly what is stalling your LCP.
Start with the Diagnostic, Not the Fix
The single most common mistake is jumping straight to image compression or CDN configuration without confirming which element is actually the LCP candidate. The LCP element is the largest visible content element in the viewport at the moment the page is considered loaded. On a typical marketing page, that is usually a hero image or a large heading rendered in a custom web font. Sometimes it is a background video poster. You need to know which one before you touch anything.
Open Chrome DevTools, navigate to the Performance panel, and run a profile with CPU throttling set to 4x slowdown and network throttling set to “Fast 3G.” This approximates the conditions under which Chrome’s field data is collected. In the resulting waterfall, look for the “LCP” marker. Click it. DevTools will highlight the element in the DOM.
Now cross-reference that with PageSpeed Insights, which reports the LCP element from real user data (the Chrome User Experience Report). If lab and field disagree on the LCP candidate, trust field data for prioritisation. The lab result is still useful for before-and-after testing once you begin making changes.
The LCP element in lab testing and the LCP element in field data are frequently different. Always confirm both before committing engineering time to a fix.
Diagnosing and Fixing Server Response Time (TTFB)
LCP cannot be faster than Time to First Byte plus the time it takes to discover, download, and render the LCP resource. If TTFB alone exceeds 1.8 seconds, no amount of image optimisation will get you into the green zone. This is why server response time comes first in the diagnostic sequence.
Measure TTFB using WebPageTest with a test location near your primary audience. Compare the result against the 800-millisecond threshold that Google considers “good.” If you are above it, the causes typically fall into a short list:
- No edge caching: The HTML document is generated on every request by a CMS or application server. Deploying a CDN with HTML caching (Cloudflare, Fastly, or AWS CloudFront with origin shield) can cut TTFB to under 100 milliseconds for cached pages.
- Slow database queries: Common on WordPress and Magento sites where plugins add uncached queries. Use query monitors to identify the slowest queries and add object caching (Redis or Memcached).
- Redirects: Each 301 or 302 redirect adds a full round trip. Audit redirect chains with WebPageTest’s waterfall view and eliminate every unnecessary hop.
- Unoptimised TLS negotiation: Ensure HTTP/2 (or HTTP/3) is enabled and TLS 1.3 is supported. Older TLS versions add extra round trips to the handshake.
For a broader look at how server-side and network factors interact with front-end budgets, our guide to website speed optimisation walks through the full stack.
Hero Images: the Most Frequent LCP Culprit
Once TTFB is under control, hero images are almost always the next target. The diagnostic question is simple: how long does it take the browser to discover, request, and fully decode the hero image? Each of those three phases can be independently slow.
Discovery: make the browser find the image immediately
If the hero image URL is buried inside a CSS background-image rule, the browser cannot discover it until it has downloaded and parsed the stylesheet. That adds hundreds of milliseconds on slow connections. Move the hero to an <img> element in the HTML source. Then add a fetchpriority="high" attribute so the browser’s preload scanner prioritises it above other resources.
For images that must remain in CSS (design system constraints, for example), add a <link rel="preload" as="image" href="hero.webp"> in the document <head>. This closes the discovery gap. Do not preload more than one or two resources per page, or you dilute the benefit.
Download: right format, right size, right CDN
Serve the hero in WebP or AVIF. AVIF typically produces files 30-50% smaller than WebP at equivalent visual quality, but encoding is slower, so it suits static assets better than user-generated content. Use the <picture> element with AVIF as the first <source> and WebP as the fallback.
Decode: watch for main-thread bottlenecks
Large JPEG and PNG files can take 50 milliseconds or more to decode on mid-range mobile devices. AVIF and WebP decode faster at equivalent quality. If you see a long “Decode Image” task in the DevTools performance trace, reduce the intrinsic resolution of the served file or switch formats. For context on how heavy JavaScript can compete with image decode for main-thread time, see our piece on reducing time to interactive.
Generate responsive variants:
Create image files at the exact widths your layout uses (e.g., 640px, 1024px, 1440px, 1920px) and serve them via srcset with a sizes attribute that matches your CSS breakpoints.
Set explicit width and height:
This prevents layout shift and allows the browser to allocate space before the image downloads, which also avoids a related CLS problem with fonts and images.
Serve from a CDN edge node:
The image should be delivered from a point of presence close to the user. If your CDN’s cache-hit ratio for the hero is below 95%, check your cache key configuration and purge strategy.
Remove lazy loading from the hero:
The loading="lazy" attribute on an above-the-fold image delays its request until the browser’s layout engine confirms it is in the viewport. This is exactly backward for LCP. Use loading="eager" or omit the attribute entirely.
Web Fonts and the Invisible-Text Problem
When the LCP element is a text node rendered in a custom web font, LCP does not fire until that font finishes loading and the text becomes visible. The browser’s default behaviour in most cases is to show invisible text (FOIT) while the font downloads. If the font file is 120 KB of WOFF2 sitting behind a third-party CDN with its own DNS lookup, you can lose 500 milliseconds or more.
The fix sequence:
If you are loading multiple font weights and styles, audit whether each is actually used on the critical rendering path. Marketing sites frequently load bold, italic, and semi-bold variants that appear only below the fold. Defer those with a media="print" onload="this.media='all'" pattern on a secondary stylesheet, or load them asynchronously via JavaScript after the page becomes interactive. Our guide to front-end performance budgets covers how to set byte limits for fonts within a broader Core Web Vitals budget.
Self-hosting and subsetting a single heading font typically saves 300-600 milliseconds of LCP time on mobile connections. It is one of the highest-return changes you can make.
Self-host your fonts:
Download the WOFF2 files and serve them from your own domain or CDN. This eliminates the extra DNS lookup, TLS handshake, and connection time for Google Fonts or Adobe Fonts domains.
Subset aggressively:
If your site is English-only, subset the font to Latin characters. Tools like pyftsubset or Font Squirrel’s generator can reduce a 90 KB file to 20 KB.
Preload the critical font file:
Add <link rel="preload" as="font" type="font/woff2" href="/fonts/heading.woff2" crossorigin>. The crossorigin attribute is required even for same-origin fonts due to the font loading spec.
Set font-display to swap or optional:
font-display: swap shows fallback text immediately and swaps in the custom font once loaded. font-display: optional goes further: if the font is not in the cache, the browser may skip it entirely, which eliminates the performance cost at the expense of visual consistency on first visit.
The Correct Order of Operations
Sequence matters because each fix changes the critical path, which can shift the LCP candidate or alter the relative contribution of remaining bottlenecks.
Do not skip the re-measurement step. A hero image fix that shaves 400 milliseconds can reveal that a render-blocking stylesheet was hiding behind it, keeping LCP in the amber zone.
Measure field LCP and identify the LCP element:
Use CrUX data via PageSpeed Insights or the CrUX API.
Fix TTFB if it exceeds 800 ms:
CDN caching, redirect removal, origin optimisation.
Optimise the LCP resource’s discoverability:
Preload hints, moving CSS background images to HTML, removing lazy loading from above-the-fold images.
Reduce the LCP resource’s transfer size:
Format conversion, responsive images, font subsetting.
Eliminate render-blocking resources:
Inline critical CSS, defer non-critical stylesheets, async-load non-essential third-party scripts.
Re-measure in both lab and field:
Field data takes 28 days to fully refresh in CrUX. Use lab tools for immediate validation, but wait for field confirmation before declaring victory.
When LCP Is Still Red After All of This
If you have addressed TTFB, optimised the hero image, and fixed font loading and LCP is still above 2.5 seconds in the field, look at two less obvious causes. First, check whether a client-side JavaScript framework is hydrating and re-rendering the LCP element after initial paint. React and Next.js pages sometimes paint the hero server-side, then tear it down and rebuild it during hydration, which resets the LCP timestamp. Partial hydration or React Server Components can solve this.
Second, check whether a service worker is intercepting the navigation request and adding latency. Poorly configured service workers can add hundreds of milliseconds to what is effectively TTFB. Test with the service worker unregistered and compare.
LCP is a chain. Every link in the chain, from DNS to server to network to browser to render, contributes. The diagnostic sequence above ensures you tighten the right link first.
FAQs
What is a good LCP score?
Google considers an LCP of 2.5 seconds or less as “good.” Scores between 2.5 and 4.0 seconds fall into the “needs improvement” range, and anything above 4.0 seconds is rated “poor.” These thresholds apply to the 75th percentile of real user page loads.
How do I find out which element is my LCP element?
Use Chrome DevTools’ Performance panel to record a page load and look for the LCP marker in the timeline. Click the marker to see the corresponding DOM element highlighted. Cross-reference with PageSpeed Insights, which reports the LCP element from real user (field) data.
Should I fix TTFB or hero images first?
Fix TTFB first. LCP can never be faster than the time it takes the server to respond plus the time to download and render the LCP resource. If your TTFB alone exceeds 800 milliseconds, image optimisation will not get LCP into the green zone.
Does lazy loading hurt LCP?
Yes, if applied to the LCP element. The loading=”lazy” attribute delays the image request until the browser confirms the image is in the viewport, which adds latency to above-the-fold images. Use loading=”eager” or omit the attribute for your hero image.
How long does it take for LCP improvements to show in Google Search Console?
Google’s Chrome User Experience Report (CrUX) uses a rolling 28-day data collection window. After deploying a fix, expect roughly four weeks before field data fully reflects the change. Lab tools like Lighthouse provide immediate feedback for validation during that waiting period.
Move Your LCP From Red to Green
The diagnostic sequence above shows where to look. Our engineering team applies these fixes across complex, high-traffic sites and validates them against real field data.