🚀 Launch Special: First 100 customers get Pro Plan FREE for 6 months!

Claim your spot

Use code LAUNCH100 at checkout

How to Fix Core Web Vitals Image Issues in WordPress

•13 min read

Images are the #1 cause of Core Web Vitals failures. If your WordPress site is failing LCP (Largest Contentful Paint) or CLS (Cumulative Layout Shift), images are almost certainly to blame. This guide shows you exactly how to diagnose and fix these issues.

KEY STAT

Images cause 80% of LCP problems on WordPress sites. Fixing your images is the single most impactful thing you can do for Core Web Vitals.

What Are Core Web Vitals?

Core Web Vitals are Google's metrics for measuring user experience. They directly affect search rankings. The three metrics are:

LCP

Largest Contentful Paint

How fast your main content loads

Good: < 2.5s

INP

Interaction to Next Paint

How fast your site responds to clicks

Good: < 200ms

CLS

Cumulative Layout Shift

How stable your layout is during load

Good: < 0.1

Images primarily affect LCP and CLS. A slow-loading hero image kills your LCP score. Images without dimensions cause layout shifts (CLS) as they load.

Diagnosing Image-Related Core Web Vitals Issues

Step 1: Run PageSpeed Insights

Go to pagespeed.web.dev and test your site. Look for:

  • "Largest Contentful Paint element" - Shows which element is your LCP (often an image)
  • "Properly size images" - Lists oversized images
  • "Serve images in next-gen formats" - Lists images not in WebP/AVIF
  • "Efficiently encode images" - Lists poorly compressed images
  • "Image elements do not have explicit width and height" - Causes CLS

Step 2: Check Google Search Console

In Search Console, go to Core Web Vitals to see which pages are failing and why. Google categorizes pages as:

  • Good: Passes all metrics
  • Needs Improvement: Close to failing
  • Poor: Failing Core Web Vitals

Step 3: Use Chrome DevTools

For detailed analysis:

  1. Open Chrome DevTools (F12)
  2. Go to the Performance tab
  3. Click the reload button to record a page load
  4. Look for the LCP marker and identify which element triggers it
  5. Check the Network tab to see image load times

Fixing LCP (Largest Contentful Paint) Issues

LCP measures how long it takes for your main content to appear. For most pages, the LCP element is an image—usually your hero image, featured image, or main product photo.

Fix #1: Compress Your LCP Image

The fastest fix is reducing file size. A good WordPress image optimizer can reduce images by 60-75% without visible quality loss.

Example LCP Improvement:

  • • Before: Hero image 1.2MB, LCP 4.8 seconds
  • • After compression: Hero image 180KB, LCP 1.9 seconds
  • Result: 2.9 second improvement

Fix #2: Convert to WebP/AVIF

Modern formats like WebP are 25-50% smaller than JPEG. This means faster downloads and better LCP scores.

  • WebP: Supported by all modern browsers, 25-35% smaller than JPEG
  • AVIF: Even better compression (50%+), growing support

Fix #3: Preload Your LCP Image

Tell the browser to load your LCP image before other resources using preload:

<link rel="preload" as="image" href="/hero-image.webp" fetchpriority="high">

You can add this to your theme's header.php or use a plugin like Perfmatters or FlyingPress to manage preloads.

Fix #4: Don't Lazy Load the LCP Image

This is a common mistake. Lazy loading delays image loading until it enters the viewport—which defeats the purpose for above-the-fold images.

WARNING

WordPress 5.5+ automatically adds loading="lazy" to all images. This can hurt LCP if applied to your hero image. You need to explicitly exclude above-the-fold images from lazy loading.

Exclude your LCP image from lazy loading by adding loading="eager":

<img src="hero.webp" loading="eager" fetchpriority="high" alt="Hero image">

Fix #5: Properly Size Images

Don't serve a 2000px image when it displays at 800px. WordPress generates multiple sizes—make sure your theme uses the appropriate one.

  • Check what size the image actually displays at (use DevTools)
  • Serve an image close to that size (1x for standard displays, 2x for retina)
  • Use srcset for responsive images

Fix #6: Use a CDN

A Content Delivery Network serves images from servers geographically closer to your users, reducing download time. Popular options:

  • Cloudflare (free tier available)
  • BunnyCDN (affordable, fast)
  • Built-in CDNs from optimization plugins

Fixing CLS (Cumulative Layout Shift) Issues

CLS measures visual stability. Images cause CLS when they load without defined dimensions, pushing other content around.

Fix #1: Always Specify Width and Height

Every image needs explicit width and height attributes. This lets the browser reserve space before the image loads:

<img src="product.webp" width="800" height="600" alt="Product">

WordPress automatically adds dimensions for images in the media library, but custom code or page builders sometimes omit them.

Fix #2: Use CSS aspect-ratio

For responsive layouts, use CSS aspect-ratio to maintain proportions:

.hero-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

Fix #3: Reserve Space for Ads and Embeds

Ads and embedded content (YouTube, social media) are common CLS culprits. Reserve space with a wrapper:

.ad-container {
  min-height: 250px; /* Reserve space for ad */
}

Fix #4: Avoid Inserting Content Above Existing Content

Cookie banners, notification bars, and late-loading content above the fold all cause CLS. Either:

  • Load them immediately (not after page load)
  • Reserve space for them in advance
  • Use overlays instead of inserting into the document flow

WordPress-Specific Optimizations

Optimize Theme Images

Your theme likely includes images (logos, backgrounds, icons) that may not be optimized. Check:

  • /wp-content/themes/your-theme/
  • /wp-content/themes/your-theme/assets/images/

These images won't be in your media library, so optimization plugins may miss them. Manually optimize or use a plugin that handles theme assets.

Check Page Builder Images

Page builders like Elementor, Divi, and WPBakery often add images in ways that bypass WordPress defaults. Verify:

  • Background images are optimized
  • All images have dimensions specified
  • Lazy loading is configured correctly

Fix Slider/Carousel Images

Sliders are notorious for Core Web Vitals issues:

  • LCP problem: First slide loads late because of slider JavaScript
  • CLS problem: Slider container has no defined height
  • Fix: Preload first slide image, set explicit container height, or replace slider with static hero

The Complete Image Optimization Stack

For best Core Web Vitals performance, combine these optimizations:

  1. Compression + WebP conversion

    Use an image optimization plugin to automatically compress and convert all images

  2. Lazy loading with LCP exclusion

    Lazy load below-fold images, but ensure above-fold images load immediately

  3. Preloading for critical images

    Preload your LCP image so it starts downloading immediately

  4. Proper sizing and dimensions

    Always specify width and height to prevent layout shifts

  5. CDN delivery

    Serve images from edge locations close to users

  6. Alt text for SEO

    While you're optimizing, add proper alt text for search visibility

Measuring Your Improvements

After implementing fixes, verify improvements:

Lab Data (Immediate)

  • PageSpeed Insights: Run tests before and after optimization
  • Lighthouse: Use Chrome DevTools for detailed reports
  • WebPageTest: Compare waterfall charts

Field Data (28-Day Rolling)

  • Google Search Console: Core Web Vitals report updates over time
  • CrUX Report: Real user data from Chrome users

Note: Field data in Search Console takes 28 days to fully reflect changes. Lab data shows immediate results but may differ from real-world performance.

Common Mistakes to Avoid

Running multiple image optimization plugins

Causes conflicts and can double-compress images, harming quality. Choose one plugin.

Lazy loading everything

Above-fold images should NOT be lazy loaded. This is the most common cause of poor LCP.

Using massive hero sliders

Sliders hurt both LCP (late loading) and CLS (layout changes). Consider a static hero image.

Ignoring mobile performance

Google uses mobile scores for ranking. Test mobile separately—it often performs worse.

Not specifying image dimensions

Missing width/height causes CLS as images load. Always include dimensions.

Core Web Vitals Image Checklist

  1. All images are compressed (60-75% reduction)

    Use an optimization plugin for automatic compression

  2. Images are served in WebP/AVIF with fallbacks

    Modern formats = smaller files = faster LCP

  3. LCP image is preloaded

    Tell browser to prioritize your hero image

  4. Above-fold images are NOT lazy loaded

    Use loading="eager" for critical images

  5. All images have width and height

    Prevents CLS by reserving space

  6. Images are properly sized for display

    Don't serve 2000px images at 800px

  7. CDN is configured

    Serve from edge locations for faster delivery

  8. Mobile performance is tested separately

    Mobile is what Google uses for ranking

Fix Your Core Web Vitals Today

Altomatic automatically compresses images, converts to WebP/AVIF, and generates SEO-friendly alt text—all in one plugin. Improve your Core Web Vitals and search rankings simultaneously.