How to fix cwv lcp on Adobe Commerce (Magento)

Reduce Largest Contentful Paint (LCP) to under 2.5 seconds by serving your hero image in a modern format, preloading it, and eliminating render-blocking resources.

Steps for Adobe Commerce (Magento)

  1. Convert hero/banner images to WebP: in Admin → Content → Blocks or Content → Pages (for CMS banners), replace image src paths with WebP versions. Store your WebP files in pub/media/ alongside originals.
  2. Edit your theme's default_head_blocks.xml or the relevant CMS page XML layout file (app/design/frontend/Vendor/theme/Magento_Theme/layout/) to inject a preload link: <link rel='preload' src='{{media url='wysiwyg/hero.webp'}}' as='image' fetchpriority='high'/>.
  3. Enable Magento's built-in JS bundling and minification: Admin → Stores → Configuration → Advanced → Developer → JavaScript Settings → set 'Merge JS Files' and 'Minify JavaScript Files' to Yes. Enable CSS minification similarly under CSS Settings.
  4. Use a performance extension such as 'Hyvä Theme' or install 'MagePrince Lazy Load' configured to exclude the LCP/hero image from lazy loading.
  5. Enable full-page cache (Admin → System → Cache Management → Full Page Cache → Varnish or built-in) and configure a CDN via Admin → Stores → Configuration → General → Web → Base URLs to serve static assets from a CDN.
  6. Deploy static content (bin/magento setup:static-content:deploy) after theme file changes, then flush cache (bin/magento cache:flush) and verify LCP with PageSpeed Insights.
Official Adobe Commerce (Magento) documentation ↗
<link rel="preload" as="image" href="/images/hero-banner.webp" fetchpriority="high" imagesrcset="/images/hero-banner-800.webp 800w, /images/hero-banner-1500.webp 1500w" imagesizes="100vw">

<!-- Hero img tag — NO lazy loading, explicit dimensions -->
<img src="/images/hero-banner.webp"
     srcset="/images/hero-banner-800.webp 800w, /images/hero-banner-1500.webp 1500w"
     sizes="100vw"
     width="1500" height="600"
     alt="Descriptive hero text"
     fetchpriority="high"
     loading="eager">

What is cwv lcp?

Largest Contentful Paint (LCP) measures how long it takes for the biggest visible element on your page — almost always the hero image or headline banner — to fully appear on the screen after someone clicks your link. Google considers anything under 2.5 seconds "Good," 2.5–4 seconds "Needs Improvement," and over 4 seconds "Poor." An LCP of 7.5 seconds on mobile means shoppers are staring at a blank or half-loaded page for over seven seconds before they see your store's main content — a painfully long wait that drives them away before they ever see your products.

LCP is one of Google's Core Web Vitals, a confirmed ranking signal that directly affects where your store appears in search results. A poor LCP score suppresses organic traffic, meaning fewer potential buyers even find your store. On mobile — where most ecommerce browsing now happens — slow LCP dramatically increases bounce rates: studies consistently show conversions drop 4–8% for every additional second of load time. Improving LCP from 7.5s to under 2.5s can meaningfully lift both your search rankings and the percentage of visitors who stay long enough to make a purchase. Mobile-first indexing means Google judges your site primarily by its mobile experience, so a slow mobile LCP hurts your desktop rankings too.

See the complete Cwv lcp guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ audit — we’ll find cwv lcp and every other issue across your whole site.

Scan my site free

Fix cwv lcp on another platform