
As web performance and page speed climb the ranks of priorities for website owners, new image formats like AVIF have been steadily gaining traction. AVIF, short for AV1 Image File Format, is celebrated for its exceptional compression and ability to deliver high-quality visuals at smaller file sizes compared to traditional JPEGs or even WebP.
It seems like a no-brainer: Switch your images to AVIF and instantly slash your page load times. But for WordPress users, the path to AVIF nirvana is far from straightforward.
The Promise and the Pitfall of AVIF Images
On paper, using AVIF in WordPress sounds simple. Upload your .avif files, and—assuming the server supports it—WordPress will handle the rest, right? Not quite. While recent WordPress versions have made strides toward supporting modern formats like WebP, AVIF support still comes with important caveats and, frankly, surprises.
Automatically Generated Image Sizes: A Hidden Headache
One of WordPress’ best features is its ability to generate multiple versions of each uploaded image. For a single upload, it’ll create thumbnails, medium, and large sizes, so your theme can serve appropriately scaled images for every context: a mobile grid, a hero banner, a gallery, and so on.
Here’s where the trouble starts. When you upload a JPEG or PNG, WordPress generates all those alternate sizes in the same format. But with AVIF, things get inconsistent.
Why? AVIF image support depends on both your WordPress version and your server’s configuration (specifically, the PHP GD or Imagick libraries and their support for AVIF). If the server can’t process AVIF for some reason—or if WordPress hits a snag—it often falls back on JPEG for the resized images. The result? Your media library starts filling up with a mix of AVIF originals and JPEG-size variants. This mixed bag can sneak up on you.
The Experience: Confusing and Frustrating
What does this mean in practice?
- Unpredictable Output: You might upload an AVIF only to discover your WordPress site is serving JPEGs for smaller sizes.
- Lost Benefits: If half your site’s images revert to JPEG, you lose the compression and speed advantages you wanted from AVIF in the first place.
- Confused Lazy Loading/Responsive Images: Many themes and plugins expect consistency in file types for
srcsetand lazy loading. Mixed file types can break or complicate those features. - Difficult Media Management: Managing and optimizing your media library becomes harder when you can’t rely on one file format per image.
Why Is This Happening?
WordPress, like any open-source project, moves cautiously when adopting new technology. While the broader web ecosystem is beginning to embrace AVIF, support among hosting providers and the underlying PHP image libraries is still patchy. So, WordPress takes the safe route—if it can’t handle an AVIF operation, it falls back, often creating resized JPEGs instead.
This conservative approach avoids broken images, but it creates a poor user experience for site owners trying to modernize their assets.
What’s the Solution?
If you want to use AVIF with WordPress today, here’s what you need to know:
- Check Server Support: Both GD and Imagick must support AVIF on your server. Many shared hosts don’t enable this by default, so you may need a custom setup or a managed WordPress host with up-to-date libraries.
- Test Before Committing: Try uploading a few AVIF files and check what sizes are being generated in your media library.
- Plugin Solutions: Some performance plugins (like ShortPixel, EWWW Image Optimizer) offer more reliable AVIF support and can handle fallback logic more gracefully—but often as part of a premium plan.
- Stay Informed: WordPress core is improving AVIF support. Follow the WordPress Make Blog or Trac tickets for updates on AVIF roadmap.
Looking Ahead
If you’re eager to leverage next-gen formats in WordPress, patience is key. For now, WebP has much broader and more reliable support. AVIF is coming of age, but as of today, WordPress’ handling is best described as “experimental.” If you’re okay with a few bumps on the road—and willing to troubleshoot formats and server libraries—you can ride the cutting edge. Otherwise, you may want to let the dust settle a bit longer.