Image & Media Delivery

WebP vs AVIF: Which Image Format Is Faster for WordPress?

If you have ever run a WordPress site through PageSpeed Insights and seen the “Serve images in next-gen formats” warning, you already know the problem: JPEG and PNG files are heavy, and heavy images slow down Largest Contentful Paint (LCP), push up page weight, and cost mobile visitors data and patience.

The fix is to move to a modern image format. Two candidates dominate the conversation: WebP and AVIF. Both shrink file sizes dramatically compared to JPEG and PNG. Both work in WordPress. But they are not interchangeable, and choosing the wrong one — or serving them badly — can quietly create more problems than it solves.

This guide compares the two formats honestly, explains what actually matters for a WordPress site, and shows you how to convert your images and serve them automatically without touching a single line of code if you do not want to.

What WebP and AVIF actually are

WebP was developed by Google and has been around for over a decade. It compresses images better than JPEG (photos) and PNG (graphics with transparency), and it supports both lossy and lossless compression plus alpha transparency — so one format can replace both JPEG and PNG in most cases.

AVIF is the newer format, built on the AV1 video codec. It compresses still images even more aggressively than WebP at the same visual quality. On a photography-heavy site, switching from JPEG to AVIF can cut image weight by a very large margin; switching from WebP to AVIF still saves a meaningful chunk on top.

File size matters, but it is only one part of the decision. Browser support, encoding speed, and how WordPress handles each format matter just as much.

WebP vs AVIF: the real comparison

File size

AVIF wins on raw compression. For the same visual quality, AVIF files are typically noticeably smaller than WebP, which are in turn much smaller than JPEG. The gap is biggest on detailed photographs — landscapes, product shots, galleries — and narrower on simple graphics.

That said, WebP’s savings over JPEG are already dramatic. If your site currently serves plain JPEGs, moving to WebP alone is the biggest single win. Moving from WebP to AVIF is a smaller, secondary gain.

Image quality

At the same file size, AVIF generally holds fine detail and smooth gradients better than WebP. This shows up in subtle places: skies, skin tones, soft shadows. WebP is no slouch — it is a huge quality step up from over-compressed JPEG — but AVIF is the better format when image fidelity matters to you, such as portfolios and product photography.

One honest caveat: at very low quality settings both formats show artifacts, and AVIF’s can look different from what you are used to. Always check converted images at actual display size before accepting aggressive settings.

Browser support

WebP has effectively universal support across all modern browsers, including Safari. You can serve WebP to essentially every visitor without worrying about fallbacks.

AVIF support is very good but not total. All current versions of Chrome, Firefox, Edge, and Safari handle AVIF, but older browser versions do not — and on the web, “older” still includes a real slice of mobile traffic in many regions. This means AVIF should never be served blindly. It needs a delivery method that falls back to WebP or JPEG for browsers that cannot decode it.

Encoding speed

Converting an image to AVIF takes meaningfully longer than converting to WebP, because the AV1 encoder is more computationally expensive. On a big media library, a bulk conversion to AVIF can take hours where WebP takes minutes. This is a one-time cost, but it is worth knowing before you start a bulk job on shared hosting.

Decoding speed (the visitor’s side) also matters: AVIF decoding is heavier than WebP decoding. On very old or low-end phones, decoding lots of AVIF images can add a little main-thread work. For most sites this is a non-issue, but on image-heavy pages aimed at budget devices it is worth testing rather than assuming.

WordPress support

WordPress has supported WebP for years: uploads, thumbnails, and the media library all handle it, and since version 6.1 WordPress even generates WebP versions of uploaded JPEGs automatically when the server supports it.

AVIF support arrived later. Recent WordPress versions accept AVIF uploads and display them in the media library, and the block editor inserts them like any other image. Support in themes, plugins, and image-processing libraries is still catching up though — some optimization plugins and page builders treat AVIF less gracefully than WebP.

Which one should you actually use?

Here is the practical answer, based on what I see across real client sites:

Use WebP as your default. It works everywhere, every optimization plugin supports it, WordPress handles it natively, and the savings over JPEG are already huge. For most WordPress sites, WebP is the format that delivers 90% of the benefit with 0% of the compatibility headaches.

Use AVIF where it earns its place. If you run a photography site, a portfolio, a travel blog, or a store where image quality directly affects revenue, serving AVIF to browsers that support it (with automatic fallback to WebP) is worth doing. The extra compression buys you faster LCP on hero images and lighter gallery pages.

Never serve AVIF without a fallback. The classic safe pattern is to serve AVIF first, fall back to WebP, and fall back to JPEG last. Modern delivery setups do this automatically — the browser tells the server which formats it accepts, and the server responds accordingly. You should not be hand-writing picture tags for every image in 2026; let the plugin or CDN handle negotiation.

Do not mix formats randomly. Pick one primary format for your whole site and convert consistently. A media library where half the images are WebP and half are AVIF is harder to audit, harder to bulk-recompress, and harder to reason about when something looks wrong.

How to convert your images (without breaking anything)

Step 1: Back up your media library

Before any bulk conversion, take a backup that includes wp-content/uploads. A good image optimizer keeps originals so you can restore or reconvert later, but a backup is your real safety net. If your host provides on-demand backups, run one now.

Step 2: Choose a conversion plugin

You have two solid options, and I have compared them in detail: ShortPixel vs Imagify. Both convert uploads to WebP and AVIF automatically, both keep originals, and both serve the right format to each browser via automatic negotiation.

What to look for in any plugin you pick:

  • Automatic format negotiation. The plugin should detect browser support and serve AVIF, WebP, or the original — without you writing rewrite rules.
  • Original image retention. You want the source files kept so you can reconvert with different settings later.
  • Bulk optimization. Your existing library needs converting too, not just new uploads. Check whether bulk runs are throttled on your hosting.
  • AVIF toggle. Some plugins convert to WebP by default and need AVIF enabled explicitly. Make sure you know which formats your plan actually generates.

Free tiers of the major plugins cover small libraries; larger sites will need a paid plan or a self-hosted tool.

Step 3: Convert new uploads automatically, then bulk-convert the backlog

Enable “convert on upload” first so every new image enters the library in the modern format. Then run the bulk optimizer on your existing media.

Run the bulk job in batches if your host is shared hosting — hundreds of AVIF conversions in one go can hit CPU or timeout limits. Most plugins let you process a set number of images per run. Start with your most-visited pages’ images so the biggest wins land first.

Step 4: Verify the right format is actually being served

Converting is not the same as serving. After conversion:

  1. Open a post with images in an incognito window.
  2. Open your browser’s developer tools, go to the Network tab, filter by “Img”.
  3. Reload and check the file extensions and the Content-Type response headers.

You should see .webp or .avif files (or the correct content type) being delivered. If you still see .jpg, the plugin’s delivery method — usually a rewrite rule or a small piece of code — is not active. Check the plugin’s settings for a “deliver WebP/AVIF” option and confirm it is enabled.

Also spot-check a few converted images visually. Bulk conversion with aggressive settings occasionally produces banding in gradients or softening in fine detail. If you see it, raise the quality setting a notch and reconvert just those images.

Common mistakes to avoid

Converting without fixing dimensions. A modern format does not fix an image that is three times wider than its display size. Resize images to sensible dimensions first, then convert. Oversized WebP files are still oversized files.

Lazy-loading the hero image. If your LCP element is an image, it must not be lazy-loaded — that delays the paint and directly hurts your Core Web Vitals score. I walk through the three ways to fix this in Fix “LCP Image Was Lazily Loaded” in WordPress. Converting to AVIF helps LCP only if the image is also loaded eagerly and ideally preloaded.

Forgetting thumbnails. WordPress generates multiple thumbnail sizes per upload. Make sure your optimizer converts those too, not just the full-size original — the thumbnails are what actually render in archives, related posts, and galleries.

Serving AVIF to everyone with no fallback. If you hand-roll format switching, test in an older browser or use developer tools to simulate one. A broken image icon is worse than a slow JPEG.

Expecting format conversion to fix everything. Images are one piece of the performance puzzle. If your TTFB is high or render-blocking scripts dominate, a format swap will move the needle less than you hope. Run through the Essential WordPress Performance Checklist to find what actually limits your site before optimizing images in isolation.

A quick decision checklist

  • Default to WebP for the whole site: universal support, native WordPress handling, big savings over JPEG.
  • Add AVIF with automatic fallback when image quality or image weight is business-critical (photography, portfolios, stores).
  • Use an optimizer plugin that negotiates formats automatically and keeps your originals.
  • Convert new uploads automatically; bulk-convert the backlog in batches on shared hosting.
  • Verify delivery in the Network tab — conversion without correct serving is wasted work.
  • Resize before converting, never lazy-load the LCP image, and convert thumbnails too.

The bottom line

WebP is the safe, universal choice and the right default for most WordPress sites. AVIF is the better compressor and the right upgrade for image-heavy sites — as long as it is served with automatic fallback to WebP or JPEG. Either way, the format is only half the job: correct sizing, eager loading of the hero image, and a plugin that actually delivers the modern file to each browser are what turn smaller files into a faster site.

3 Comments on “WebP vs AVIF: Which Image Format Is Faster for WordPress?”

Leave a Reply

Your email address will not be published. Required fields are marked *