Next-Gen Image Formats WordPress - Serve WebP and AVIF the Right Way (2026)

WebP and AVIF images are usually much smaller than JPEG and PNG at similar quality. Switching to them is one of the most reliable ways to speed up image-heavy WordPress pages.

What "Next-Gen Formats" Means

Older formats like JPEG and PNG have been around for decades. Newer formats compress images more efficiently, so the same picture takes fewer bytes.

PageSpeed Insights used to flag this as "Serve images in next-gen formats". In Lighthouse 13, it's part of the Improve image delivery insight, which also covers images that are too large for how they're displayed.

WebP vs AVIF vs JPEG

Illustration for WebP vs AVIF vs JPEG on the Next-Gen Image Formats WordPress page, showing a compare diagram
Image formats compared
JPEGPNGWebPAVIF
Best forPhotosGraphics, transparencyPhotos and graphicsPhotos and graphics
Typical file sizeBaselineLarge for photosSmaller than JPEGOften smallest
TransparencyNoYesYesYes
Browser supportUniversalUniversalModern browsersModern browsers
Encoding speedFastFastFastSlower
WordPress upload supportYesYesSince 5.8Since 6.5, if the server supports it

Exact savings depend on the image and quality settings, so test with your own images.

How WordPress Supports Modern Formats

WordPress can accept WebP uploads since version 5.8 and AVIF since version 6.5, provided your server's image library supports them. When you upload a WebP or AVIF, WordPress creates its usual resized versions in the same format.

WordPress doesn't convert existing JPEGs and PNGs on its own. For that, you need a plugin or a CDN that converts images.

Ways to Convert and Serve Next-Gen Images

Options for next-gen images
MethodHow It WorksProsCons
Convert before uploadSave images as WebP or AVIF on your computerNo plugin neededManual; doesn't fix existing images
Image optimization pluginConverts library images and serves them to supported browsersHandles existing images; automaticAdds a plugin; some use paid quotas
Modern Image Formats pluginWordPress Performance Team plugin that converts uploadsLightweight, from the core teamFocuses on new uploads
Image CDNConverts and resizes on the flyNo local storage; responsive sizesOngoing cost; relies on a service

How Converted Images Are Served

Illustration for How Converted Images Are Served on the Next-Gen Image Formats WordPress page, showing a image diagram

Plugins serve WebP or AVIF in one of two main ways:

Both work. Rewrite rules can conflict with caching if the cache doesn't vary by browser support, which is why WP Rocket offers a WebP Compatibility add-on that coordinates with image plugins.

Using Next-Gen Images With WP Rocket

WP Rocket doesn't convert images itself. It works with image optimization plugins that do, including Imagify, from the same company. Its WebP Compatibility add-on makes sure cached pages serve WebP correctly when your image plugin uses the picture-element approach.

A recent WP Rocket release also stopped serving WebP files that are larger than the original image, which can happen with some graphics.

  1. Choose an image plugin

    Pick one that converts to WebP, and AVIF if you want it.

  2. Convert your library

    Run bulk conversion for existing images.

  3. Choose a serving method

    Picture elements are the most cache-friendly with WP Rocket.

  4. Enable WebP compatibility if needed

    In WP Rocket's add-ons, when your image plugin relies on it.

  5. Clear caches and test

    Check in the Network panel that images load as WebP or AVIF.

See best image optimization plugins.

Common Problems When Switching Formats

Images not served as WebP

The cache was built before conversion. Clear the page cache and CDN cache.

Some browsers get broken images

The fallback isn't set up. Use picture elements or ensure the plugin keeps originals.

Background images still JPEG

CSS background images aren't converted by many plugins. Convert those files manually or use a plugin that handles CSS.

WebP larger than JPEG

Happens with some graphics. Keep the smaller original; some tools do this automatically.

CDN serves the wrong format

The CDN cache needs to vary by browser support, or use URLs that differ by format.

Quality Settings

Illustration for Quality Settings on the Next-Gen Image Formats WordPress page, showing a image diagram

Compression level matters as much as format. Most tools let you choose lossy, glossy or lossless modes. For photos, a moderate lossy setting usually gives big savings with no visible difference. For logos, screenshots and graphics with text, lossless or higher quality settings avoid blurry edges.

Check a few representative images side by side before converting your whole library.

Don't Forget Sizing

Next-gen formats reduce bytes per pixel, but serving a 3,000-pixel image in a 600-pixel space still wastes bandwidth. Make sure:

See optimizing images.

A Worked Example

A photography portfolio serves large JPEGs and fails LCP on mobile. Converting the library to WebP with AVIF where supported, and capping originals at a sensible width, cuts image weight on gallery pages dramatically. The hero image on the homepage, now an AVIF with the right dimensions for mobile, loads much sooner, and LCP passes.

Next-Gen Image Formats WordPress FAQ

What are next-gen image formats?

Modern formats like WebP and AVIF that compress images more efficiently than JPEG and PNG.

Does WordPress support WebP and AVIF?

Yes for uploads: WebP since 5.8 and AVIF since 6.5, if your server supports them. Converting existing images needs a plugin or CDN.

Should I use WebP or AVIF?

WebP is the safe default. AVIF is often smaller and is supported by modern browsers; serve it with a fallback.

Does WP Rocket convert images to WebP?

No. It works with image optimization plugins that convert images, and has a WebP Compatibility add-on.