Back to Blog
May 1, 2026
2 min readUpdated: May 12, 2026

Why Your Images Slow Your Lighthouse Score

Do you have a question or doubt about something?

Scroll down to the bottom to ask your question, and I or anyone else will respond!

Why Your Images Slow Your Lighthouse Score

The Diagnosis

Lighthouse warns about images for three reasons:

WarningWhat It MeansFix
"Properly size images"Serves 2000px image in 200px containerUse srcset
"Serve images in modern formats"Using JPEG/PNG instead of WebP/AVIFConvert
"Efficiently encode images"Image compression could be betterRun through optimizer

Step-by-Step: Fix Every Image Problem

Step 1: Use Next.js Image component

import Image from 'next/image'

// ❌ Bad
<img src="/product.jpg" /&gt;

// ✅ Good
<Image 
  src="/product.jpg"
  width={800}
  height={600}
  alt="Product"
  sizes="(max-width: 768px) 100vw, 50vw"
/&gt;

Step 2: Serve modern formats

<Image
  src="/product.avif"  // AVIF &gt; WebP &gt; JPEG
  alt="Product"
  width={800}
  height={600}
/&gt;

Step 3: Lazy load (automatic in Next.js) Images not in viewport aren't loaded until needed.

Step 4: Set explicit dimensions

// Always set width/height to prevent layout shift (CLS)
<Image width={800} height={600} ... /&gt;

Step 5: Optimize images before uploading

ToolWhat it does
SquooshConvert to WebP/AVIF, adjust quality
imageminCLI batch processing
Next.js built-inAutomatically optimizes on import

The 80/20 Fix

Do these two things first:

  1. Switch to Next.js Image component (fixes 50% of issues)
  2. Convert images to WebP (fixes 30% of issues)

That's 80% of the value for 20% of the work.

Checking Your Score

# Run Lighthouse
npx lighthouse https://yoursite.com --view

# Or use Web Vitals extension

Resources

ResourceUse
Next.js Image docsOfficial docs
Squoosh.appImage optimization
web.dev/optimize-imagesGoogle's guide

Was this helpful?

Discussion

0

Do you have a question or any doubt?

Ask here and I or anyone else will respond!

Loading comments...
2B

By 2BigDev

Full-Stack Engineer