How to Improve LCP in WordPress

Largest Contentful Paint, or LCP, measures how long it takes for the largest meaningful image or text block in the viewport to render. On WordPress, the LCP element is often a hero image, featured image, large heading, or banner. The fastest fix is to identify that exact element and remove the delay around it.

Do not begin by lazy-loading more things. In fact, the LCP image should usually load early. If you have not measured the page yet, start with the WordPress speed test guide and note the LCP element reported by Lighthouse or browser developer tools.

Find the real LCP element

Run PageSpeed Insights and inspect the LCP diagnostic. Then open browser developer tools and confirm what becomes the largest visible element during load. The LCP element can differ by viewport, page state, or content.

On mobile, a featured image may be LCP. On desktop, the large heading next to it may win instead. If a cookie banner or late hero slider covers much of the viewport, it can change what the browser measures.

Fix the element visitors actually see, not the element you expected.

Fix slow TTFB before the LCP resource

The browser cannot render the LCP element before the HTML starts to arrive. A slow server response pushes the whole loading chain later.

If TTFB is high, work through the TTFB guide first. Page cache, faster PHP work, database fixes, or better origin capacity can create more LCP improvement than changing an image format.

Do not lazy-load the LCP image

Lazy loading is meant for offscreen content. When the main hero or featured image is in the first viewport, adding loading="lazy" can make the browser wait before fetching a resource it needs immediately.

Modern WordPress tries to make smart loading choices, but themes, builders, optimization plugins, and custom code can override them. Inspect the final HTML. If the LCP image is above the fold, it should normally be eager rather than lazy.

Our WordPress lazy-loading guide covers the split between above-the-fold and offscreen media.

Make the LCP resource easy to discover

An image in a normal <img> element can be discovered as the browser parses HTML. A background image defined inside a late CSS file may be discovered much later. An image injected by JavaScript may be later still.

When a critical image is hidden behind CSS or JavaScript discovery, consider whether the design can use ordinary responsive image markup instead. If the resource truly must be discovered late, a carefully chosen preload can help the browser start it sooner.

Preload only a small number of critical resources. Preloading everything creates competition and can slow the file you care about.

Use fetch priority carefully

The fetchpriority attribute can hint that an important image should receive high priority. WordPress has built-in loading optimization logic and may add priority hints when it identifies a likely LCP image.

Do not mark several images as high priority. The browser has limited bandwidth. When many files claim urgency, the hint becomes less useful.

Serve the right image size

A 2000-pixel image sent to a 700-pixel slot wastes bytes and keeps the LCP resource in flight longer. WordPress can generate multiple sizes and create srcset markup so the browser chooses a candidate.

The sizes value is important because it tells the browser how wide the image will appear. A theme that says an image is 100vw when it actually uses half the screen can cause the browser to choose a file that is too large.

Check our responsive image guide if mobile devices keep downloading oversized files.

Compress without destroying the image

Use sensible compression and modern formats such as WebP or AVIF when they fit your workflow. WordPress supports AVIF when the server image library supports it.

Format is only part of the job. A right-sized image with reasonable compression is usually more important than choosing the newest format and ignoring dimensions.

Remove bandwidth competition above the fold

The LCP image may be correct and still load late because the page starts too many other requests first. Fonts, sliders, tag managers, ad code, large CSS files, and high-priority scripts can compete for bandwidth.

Open the network waterfall and look at what starts before the LCP request. Remove unnecessary early requests. Delay non-critical third-party scripts. Load only the font files used in the first view.

Reduce render delay after the file arrives

LCP can stay slow even when the image downloads quickly if the browser cannot render it. Large stylesheets, synchronous JavaScript, expensive layout work, or a hidden element waiting for a script can create render delay.

Check whether the LCP resource finishes early but the LCP timestamp occurs much later. If so, the problem is not the download itself. Work on render-blocking CSS, JavaScript, and element visibility.

Be careful with hero sliders

Sliders often make LCP harder. They may load several large images, depend on JavaScript before showing the first slide, and change the largest element during startup.

If the first slide is the important content, render it as normal HTML and image markup before the slider script enhances it. Do not make the main message wait for a carousel library.

Text can be the LCP element too

If a large heading or paragraph is LCP, custom font loading can delay the paint. Too many font files, late font discovery, or a long block period can make the text appear later than needed.

Use a small font set and a sensible font-display strategy. Consider system fonts for performance-first sites. If the font is critical, preload only the exact file needed for the first view.

Do not optimize from Lighthouse alone

Use field data when available. Real visitors can have different LCP elements, cache states, devices, and connections. A lab test is excellent for debugging, but the field result tells you whether the change helped people over time.

After a fix, keep the lab test for immediate feedback and watch the 28-day real-user window as new data replaces old visits.

A safe WordPress LCP checklist

  1. Identify the LCP element on mobile and desktop.
  2. Fix high TTFB first.
  3. Keep an above-the-fold LCP image eager.
  4. Make the image discoverable in HTML when possible.
  5. Use correct responsive sizes and compression.
  6. Use high fetch priority only for a truly critical image.
  7. Reduce competing fonts, scripts, ads, and CSS.
  8. Check render delay after the resource finishes.
  9. Retest in the lab and watch field data.

Check whether the LCP image is requested twice

Optimization plugins can accidentally create duplicate downloads when they preload one image URL but the page later requests a different responsive candidate, or when a background-image preload does not match the final CSS resource. Use the network panel to make sure the browser is not fetching two versions of the same hero for the first view.

If you preload a responsive image, the preload should match the resource the browser is likely to use. A mismatched preload can consume bandwidth without helping LCP. In many WordPress layouts, normal responsive image markup plus correct fetch priority is simpler and safer than adding custom preload rules.

Check the image processing pipeline

Some WordPress sites create several copies of an image through WordPress, a CDN, an image optimization plugin, and a page builder. That can make it hard to know which file the visitor receives. Inspect the final request URL, content type, dimensions, and transferred bytes. Then simplify duplicate processing if two services are doing the same job.

Do not keep originals at enormous dimensions just because storage is cheap if those files are later used accidentally. Set an upload and editorial workflow that matches the largest real display size needed by the site.

Test LCP on important templates

The home page may use a hero image while articles use a text heading and product pages use a gallery. LCP work is template-specific. Test the pages that drive traffic or revenue, find each template’s LCP element, and fix the common pattern at the template level when possible. One theme change can then improve hundreds of URLs.

Keep the first viewport simple enough that the browser has a clear priority order. A large hero, two font families, a video background, three trackers, a slider, and several preloads all competing at once make LCP harder to control. Remove early work that does not help the first view.

Sources and further reading

Related FastWP guides