Skip to main content
KadiCache
Lighthouse: modern-image-formats · Media & Fonts10 min read1,051 wordsVerified 2026-11-23

How to Fix “Serve images in next-gen formats” (WebP & AVIF) in WordPress

Lighthouse triggers “Serve images in next-gen formats” whenever legacy JPEG or PNG images could save at least 8 KiB by switching to WebP or AVIF. Convert HTML, srcset, and CSS background images non-destructively.

Serve images in next-gen formats (modern-image-formats) WordPress optimization diagram
0.000 Layout Shift5 Sections✓ Verified
Lighthouse Audit ID
modern-image-formats
Metrics Affected
LCP · Speed Index
KadiCache Solution Tier
Cloud Pro
3-Step Quick Action Plan (Schema HowTo)
STEP 01
Enable Cloud WebP Conversion in Lossy · Balanced Mode (Quality 82)

Open WP Admin -> KadiCache -> Images, toggle ON Convert images to WebP, and keep Lossy · Balanced (Quality ~80–82) for 55%–80% smaller product and hero photos.

STEP 02
Switch Photography Portfolios to Lossless · Exact Only Where Needed

Need bit-exact pixel fidelity on medical diagrams or UI mockups? Select Lossless · Exact or exclude specific portfolio URLs inside Image Exclusions.

STEP 03
Pair With Pro Local Improve LCP & Native Lazyload

Ensure Improve LCP (Core Web Vitals) and Native Image Lazyload (Lazyload) are active so your prioritized hero WebP arrives first and below-the-fold WebPs defer cleanly.

WP Admin -> KadiCache -> Images (Pro)
MODULE Media & Fonts · 2X RETINA
Cloud WebP conversion with segmented compression modes, synced quality slider, and non-destructive local publication.2880×1840 WebP
⚡ Executive Summary · 30-Second Spec100% Code-Verified
WP Admin Path
WP Admin -> KadiCache -> Images
Measured Impact
55%–82% Smaller Image Payloads · Originals 100% Untouched
DevTools Proof Marker
Lighthouse ID: modern-image-formats & uses-optimized-images
  • Lighthouse re-encodes every raster image (JPEG, PNG, BMP) during its audit and flags modern-image-formats (and uses-optimized-images) whenever modern compression saves >= 8 KiB.
  • Why WordPress Core’s WebP upload setting leaves sites failing: it does nothing for your existing 5,000 Media Library JPEGs/PNGs, theme /assets/images/*.png files, or Elementor CSS background-image banners!
  • Unlike external image-proxy CDNs that rewrite your image URLs to a foreign third-party domain (hurting image SEO if you ever cancel), KadiCache stores converted .webp files locally on your own WordPress domain!
  • Non-Destructive Guarantee: Original .jpg and .png files in wp-content/uploads/ are never deleted or overwritten, and can be restored in 1 click at any time.
Table of Contents (5 sections)

How Lighthouse Evaluates modern-image-formats & uses-optimized-images#

Google PageSpeed Insights runs two closely related image byte-efficiency audits on every visible and eagerly loaded image:

  1. Serve images in next-gen formats (modern-image-formats): Estimates byte savings from converting JPEG / PNG images into WebP or AVIF (>= 8 KiB savings threshold per file).
  2. Efficiently encode images (uses-optimized-images): Flags uncompressed Quality 95–100 Photoshop/Canva JPEGs where standard Quality 80–85 perceptual encoding cuts 60%+ file weight with zero visible difference to the human eye.

Converting images to properly tuned WebP (Quality 80–82) clears both audits simultaneously—slashing Resource Load Duration on your hero banner (LCP) and accelerating visual progression (Speed Index)!

Why PNG Screenshots & WooCommerce Catalogs Fail So Badly on Mobile#

Common WordPress Image UploadTypical Raw SizeWebP (Quality 82) SizeMobile 4G Load Time (1.6 Mbps)
Canva / Uncompressed Hero Banner (.png)1,420 KB74 KB (-94.8%)Drops from 7.1 s to 0.37 s!
DSLR WooCommerce Product Photo (.jpg, Q98)540 KB58 KB (-89.2%)Drops from 2.7 s to 0.29 s!
Elementor Section Background Photo (.jpg)680 KB69 KB (-89.8%)Drops from 3.4 s to 0.35 s!
Transparent Brand Logo / Badge (.png)95 KB14 KB (-85.2%)Drops from 0.48 s to 0.07 s!
FIG 01Converting JPEG and PNG assets to local WebP with interactive quality slider inside WP Admin -> KadiCache -> ImagesZoom 2x

Manual Developer Fixes (WordPress Upload Filter & CLI Conversion)#

For brand-new uploads going forward on servers with Imagick or GD WebP compiled in PHP, WordPress 5.8+ provides a filter to generate WebP sub-sizes on upload:

PHPManual WordPress 5.8+ Filter (Applies ONLY to Future Media Uploads)
add_filter('image_editor_output_format', static function (array $formats): array {
    $formats['image/jpeg'] = 'image/webp';
    $formats['image/png']  = 'image/webp';
    return $formats;
});

Why that PHP filter alone doesn’t clear PageSpeed Insights on existing sites:

  • It does not convert any of your existing historical uploads, WooCommerce product catalogs, or theme /assets/ graphics.
  • Burning CPU cycles inside PHP gd / imagick on a shared VPS while importing 500 WooCommerce CSV products spikes origin CPU to 100% and times out 504 Gateway Timeout!

How KadiCache Cloud WebP Solves Image Compression With Zero Origin CPU#

FIG 02Pixel-exact lossless mode retaining original files whenever lossless output would exceed original sizeZoom 2x
  1. Zero Origin PHP CPU Load (WP Admin -> KadiCache -> Images): Image compression runs off-server in KadiCache Cloud Pro (Cloud WebP Guide), then publishes verified .webp files back onto your own WordPress domain—zero 504 timeouts and zero foreign CDN lock-in!
  2. Complete HTML, srcset, <picture> & CSS Coverage (ExtensionImages.php & ImageUrlMap.php): Rewrites standard <img src>, every responsive srcset candidate, and CSS background-image: url(...) rules automatically—even inside reduced inline <style> blocks!
  3. Lossy · Balanced vs Lossless · Exact Size Guard: Choose Lossy · Balanced (default 82 quality) for photographs, or Lossless · Exact for pixel-exact technical graphics; if a tiny pre-optimized PNG would ever grow larger as WebP, KadiCache keeps the smaller original automatically.
  4. 100% Non-Destructive & Reversible (Cloud Connection / Image Exclusions): Your original .jpg / .png files remain untouched in wp-content/uploads/. Exclude downloadable print files or photography galleries via Images -> Exclusions (images-pro-exclusions-modal) or restore originals in 1 click!

WebP vs AVIF vs Legacy JPEG/PNG: Engineering Comparison for WordPress#

Site owners often ask whether WebP is sufficient to pass Google PageSpeed Insights 100 / 100 or if every image must be re-encoded twice into AVIF:

Image FormatCompression vs Raw JPEG/PNGBrowser & Social App SupportEncoding Speed & Edge Cases
Legacy JPEG / PNGBaseline (100% weight — heavy!)100% universal (best kept for <meta property="og:image"> social cards)Fails modern-image-formats whenever >= 8 KiB savings exist
Modern WebP (Lossy Q82 / Lossless)-55% to -85% smaller (clears PSI green!)98.7%+ global support (Safari iOS 14+, Chrome, Edge, Firefox, Android)Crisp textures, full alpha transparency, fast decode on budget phones
AVIF-60% to -88% smaller on smooth gradients~93% browser support (older enterprise/webview clients need fallback)8×–12× heavier encode cost; can over-smooth fine fabric/skin grain at low bitrates

Notice a subtle SEO detail KadiCache handles safely: social link-preview crawlers on legacy messaging apps sometimes expect <meta property="og:image"> in <head> to remain a standard .jpg/.png or widely supported .webp URL on your primary domain. Because KadiCache keeps your original .jpg and .png files live on disk while rewriting storefront <img>, srcset, and CSS background-image URLs to local .webp assets, social previews, RSS feeds, and downloadable links never break!

BASHVerify Local WebP HTTP Delivery & Byte Savings via curl
# Confirm your converted WebP serves directly from your domain with 1-year cache headers:
curl -sI "https://your-site.com/wp-content/kadicache-assets/images/hero-banner.webp" | grep -iE "http/|content-type|content-length|cache-control"

# Expected Output:
# HTTP/2 200
# content-type: image/webp
# content-length: 61840
# cache-control: public, max-age=31536000, immutable

“Serve images in next-gen formats” — Frequently Asked Questions

Do all modern iPhone (Safari iOS), Android, Mac, and Windows browsers support WebP?
Yes! Safari added full WebP support in iOS 14 and macOS Big Sur back in 2020, joining Chrome, Edge, Firefox, and Samsung Internet—giving WebP > 98.5% global browser support across mobile and desktop.
What happens to my images if I ever disconnect KadiCache Cloud Pro or deactivate the plugin?
Because KadiCache NEVER deletes or overwrites your original .jpg and .png uploads in wp-content/uploads/, your WordPress Media Library, WooCommerce products, and posts remain 100% intact with zero broken image URLs!
Does WebP preserve transparent backgrounds on PNG logos and product cutouts?
Yes! Both Lossy and Lossless WebP support full 8-bit alpha-channel transparency—shrinking a 140 KB transparent PNG cutout down to ~18–26 KB with clean transparent edges.
Why did one external Instagram or third-party badge image still appear in modern-image-formats?
WordPress plugins can only optimize images hosted on your own WordPress server—not images hotlinked from external domains like cdninstagram.com or badge providers. Download static trust badges into your WordPress Media Library so KadiCache converts and caches them locally!
Will Google Images index local .webp product photos normally for WooCommerce SEO?
Yes—Google Search Central explicitly recommends WebP and indexes local .webp URLs on your own domain with full Google Shopping and Image Search rich-result eligibility!
Verified WordPress Fix · modern-image-formats
Clear “Serve images in next-gen formats” without breaking Elementor or WooCommerce.
E-E-A-T Source Verified

Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.

apps/wordpress-plugin/src/Optimization/ExtensionImages.phpapps/wordpress-plugin/src/Optimization/ImageUrlMap.phpapps/wordpress-plugin/src/Integrations/PageSpeed/Distiller/LighthouseReportDistiller.php
Connected Topical Cluster · Continue Deepening Your Setup