CHECKING STATUS
I AM LISTENING TO
|

WebP and AVIF Formats: Adding them to WordPress Via Plugins or Docker (2025)

3. March 2025
.SHARE

Table of Contents

Modern image formats like WebP and AVIF can significantly improve your WordPress site’s performance. These formats offer superior compression with minimal quality loss, resulting in faster page loads and better Core Web Vitals scores. This guide covers both free and paid options for implementing these next-generation image formats on your WordPress site.

Why Use WebP and AVIF?

  • WebP: Developed by Google, WebP offers 25-35% smaller file sizes compared to JPEG with similar visual quality
  • AVIF: A newer format offering up to 50% smaller file sizes than JPEG and superior compression compared to WebP

Native WordPress Support

As of WordPress 6.5 (released in March 2024), AVIF is now natively supported. WebP support was added in WordPress 5.8. This means:

  • WordPress can now natively handle both formats without additional plugins
  • The core media library can generate WebP and AVIF thumbnails
  • Images uploaded in these formats will be properly displayed

However, for automatic conversion of existing images or more advanced optimization features, you’ll still need plugins.

Free Plugin Options

1. Converter for Media (WebP & AVIF)

Converter for Media

Features:

  • Converts JPEG, PNG, and GIF to WebP and AVIF
  • Serves optimized images via rewrites
  • Supports lazy loading
  • Detection of browser compatibility
  • No image quality loss
  • Regeneration tool for existing images

Pros:

  • Simple setup
  • Good performance
  • No configuration required
  • Regular updates

Cons:

  • Limited advanced options in free version

2. ShortPixel Image Optimizer

ShortPixel

Features:

  • Converts images to WebP and AVIF
  • Lossy and lossless compression
  • Bulk optimization
  • PDF optimization
  • 100 free images per month

Pros:

  • High-quality compression
  • Multiple compression options
  • Good customer support

Cons:

  • Limited free quota
  • Some features require paid plan

3. CompressX

CompressX

Features:

  • Lightweight WebP & AVIF conversion
  • Simple user interface
  • Bulk conversion tools
  • Supports various image formats

Pros:

  • Minimal configuration
  • Fast processing
  • Completely free

Cons:

  • Fewer advanced features than premium alternatives

4. Modern Image Formats

Modern Image Formats

Features:

  • Converts uploaded images to WebP
  • Option to generate JPEG files alongside WebP
  • Core WordPress integration

Pros:

  • Minimal resource usage
  • Simple configuration
  • Good compatibility

Cons:

  • Limited compression options
  • Limited AVIF support

5. Optimole

Optimole

Features:

  • Cloud-based image optimization
  • Automatic WebP conversion
  • AVIF support with additional setup
  • Lazy loading
  • CDN delivery
  • 5,000 free visitors per month

Pros:

  • No server load (cloud-based)
  • Adaptive images based on visitor’s device
  • CDN included

Cons:

  • Limited free tier
  • Requires external service

Paid Plugin Options

1. Converter for Media PRO

Converter for Media PRO

Features:

  • Everything in the free version
  • Priority support
  • Advanced settings
  • Bulk conversion tools
  • Custom path exclusions

Pricing:

  • $49 for a single site (annual)
  • $79 for unlimited sites (annual)

2. ShortPixel Premium

ShortPixel Premium

Features:

  • All free features
  • Higher monthly image quotas
  • Advanced compression settings
  • Priority support

Pricing:

  • Plans start at $4.99/month for 7,000 images
  • One-time credits also available

I am using Shortpixel on many websites by now, as its a painless and quick solution. You can either use their CDN, their CDN with your own domain or store files locally.

3. Imagify

Imagify

Features:

  • Convert to WebP and AVIF
  • Three optimization levels
  • Bulk optimization
  • Original image backup
  • Easy restoration

Pricing:

  • Free: 20MB/month
  • Lite: $4.99/month for 500MB
  • Growth: $9.99/month for 2GB
  • Infinite: $69.99/month for unlimited

4. Elementor Image Optimizer

Elementor Image Optimizer

Features:

  • WebP and AVIF conversion
  • Built into Elementor Pro
  • Automated image optimization
  • Preserves image quality

Pricing:

  • Included with Elementor Pro plans (starting at $59/year)

5. WP Rocket with Imagify

WP Rocket

Features:

  • Premium caching plugin with Imagify integration
  • WebP and AVIF support through integration
  • Comprehensive performance optimization
  • File optimization

Pricing:

  • WP Rocket: $59/year for a single site
  • Imagify sold separately or as bundle

Manual Implementation (No Plugins)

For developers who prefer not to use plugins, here are manual approaches:

1. Server Configuration

Configure your server to serve WebP and AVIF images with content negotiation using .htaccess (Apache) or nginx.conf (Nginx).

Apache (.htaccess) example:

2. Pre-convert Images

Convert images to WebP and AVIF formats before uploading to WordPress using:

  • Command-line tools like cwebp for WebP and avifenc for AVIF
  • Online services like Squoosh
  • Desktop applications like XnConvert

3. Custom WordPress Functions

Add functions to your theme’s functions.php file to serve WebP/AVIF alternatives when available.

Recommendations Based on Site Size

For Small Blogs

  • Free Option: Converter for Media
  • Paid Option: ShortPixel Premium (small plan)

For Business Websites

  • Free Option: Optimole (within free limit)
  • Paid Option: Converter for Media PRO

For E-commerce/Large Sites

  • Paid Option: Imagify Growth or Infinite plan
  • Alternative: WP Rocket + Imagify bundle

Implementation Considerations

  1. Browser Compatibility: AVIF has less browser support than WebP, so always use a fallback system
  2. Server Resources: Some conversion processes are resource-intensive; cloud options may be better for shared hosting
  3. Existing Images: Most plugins offer bulk conversion for existing media libraries
  4. CDN Integration: Ensure your CDN supports WebP and AVIF if you’re using one

Docker Options

For developers and site administrators who use containerized environments, Docker provides excellent options for implementing WebP and AVIF conversion without relying on WordPress plugins.

1. Imgproxy

Imgproxy is a fast and secure standalone server for image processing and optimization.

Features:

  • On-the-fly image processing and format conversion
  • Automatic WebP and AVIF format negotiation
  • Resize, crop, and other transformations
  • JPEG, PNG, GIF, WebP, AVIF, HEIC, BMP, TIFF, and SVG support
  • Easy implementation with pre-built Docker containers

Implementation:

Integration with WordPress:

  • Configure nginx/Apache to proxy image requests to imgproxy
  • Images are processed on-the-fly and cached
  • No WordPress plugin required

2. Docker-Compose Stack with WebP/AVIF Support

Just started playing with this start of the year and is another cost effective option, that can easily scale if needed.

You can create a full WordPress stack with WebP/AVIF support using Docker Compose:

3. Libvips Docker Container

Libvips is a fast, multi-threaded image processing library that powers many image conversion tools.

Features:

  • High-performance image processing
  • Low memory usage
  • Supports WebP and AVIF conversion
  • Can be used in a dedicated container for batch processing

Sample Docker Setup:

Usage with WordPress:

  1. Mount your WordPress uploads directory to the container
  2. Run the container to batch convert images
  3. Set up your web server to serve WebP/AVIF versions when available

4. WebP Cloud Services Docker Integration

WebP Cloud Services offers a Docker-ready solution for WordPress with WebP/AVIF conversion.

Features:

  • Complete WordPress stack with optimized images
  • Cloudflare integration for enhanced delivery
  • Automatic WebP and AVIF conversion
  • Docker-Compose ready deployment

Benefits:

  • Pre-configured solution
  • Optimized for performance
  • Includes CDN capabilities

Thoughts

With WordPress 6.5+’s native AVIF support joining WebP compatibility, implementing these next-generation formats is easier than ever. For most users, a dedicated plugin provides the best balance of simplicity and effectiveness, while developers might prefer manual implementation or Docker-based solutions for maximum control and performance.

The right choice depends on your site’s size, budget, and technical requirements. Free options work well for smaller sites, while paid solutions offer better performance and features for larger, image-heavy websites. Docker solutions provide the most flexibility for developers working in containerized environments.

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Introduction Iframely is a powerful oEmbed proxy service that helps web developers embed content from over 1,800 domains through custom parsers, oEmbed, Twitter Cards, and Open Graph protocols. While Iframely offers a hosted cloud solution, many developers prefer self-hosting for cost savings, data privacy, and customization reasons. In this guide, we’ll walk through the process […]

Typography is the silent ambassador of your brand, and choosing the right font combinations can make or break your design. Whether you’re creating a website, designing marketing materials, or working on a presentation, font pairing is an essential skill that separates amateur designs from professional ones. In this comprehensive guide, we’ll explore the best resources […]

Embedding Vimeo videos on your website provides a seamless viewing experience for your visitors without requiring them to navigate away to Vimeo’s platform. This guide explores various methods for embedding Vimeo videos, with a focus on programmer-friendly solutions that offer customization and control. Basic Embedding Options Standard iframe Embed The simplest way to embed a […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.