Prompt
What should I do if my compressed images still fail Lighthouse scores?
Latest observation
If your images are already compressed but Lighthouse still scores them poorly, the issue is usually not just file size. Lighthouse looks at a few image-related factors, so here’s what to check next:
1) Serve the right image dimensions
A common problem is sending images that are much larger than the displayed size.
- If an image displays at
400x300, don’t serve a2000x1500file. - Use responsive images (
srcset,sizes) so browsers can pick the best size.
2) Use modern formats
JPEG/PNG can still be heavier than needed.
- Prefer WebP or AVIF when possible.
- Keep JPEG only when needed for compatibility or certain photo workflows.
3) Lazy-load below-the-fold images
If images aren’t visible right away, they can still hurt Lighthouse if they load too early.
- Add
loading="lazy"to non-critical images. - Don’t lazy-load the main hero/LCP image.
4) Optimize the LCP image specifically
Lighthouse often penalizes the largest contentful paint image if it loads slowly.
- Make sure the hero image is:
- properly sized,
- preloaded if necessary,
- not lazy-loaded,
- served from a fast CDN.
5) Check image delivery performance
Even a small image can score poorly if delivery is slow.
- Use a CDN
- Enable caching
- Compress over the wire with Brotli/Gzip where applicable
- Make sure response times are low
6) Avoid unnecessary image processing overhead
Sometimes Lighthouse flags things because images are decoded or rendered inefficiently.
- Avoid huge CSS backgrounds if a regular
<img>works better - Minimize layout shifts caused by missing width/height
- Set
widthandheightattributes to reserve space
7) Inspect Lighthouse’s exact warning
Lighthouse usually tells you why.
Look for messages like:
- “Properly size images”
- “Serve images in next-gen formats”
- “Defer offscreen images”
- “Largest Contentful Paint image was lazily loaded”
That will point to the actual fix.
8) Re-check after fixing
After changes:
- Clear cache
- Run Lighthouse again in incognito
- Test on mobile throttling, since that’s often the stricter result
If you want, I can help you interpret a specific Lighthouse warning or audit screenshot and tell you exactly what to change.