AVIF Conversion
Automatically convert uploaded JPEG and PNG images to AVIF format during upload. AVIF delivers up to 50% smaller file sizes than JPEG while maintaining excellent visual quality, making it the most efficient next-generation image format available today.
Use Cases
- Next-Gen Image Optimization – Serve the smallest possible image files without sacrificing visual quality, using the most advanced compression format available
- Core Web Vitals Boost – Dramatically improve Largest Contentful Paint (LCP) scores by reducing image payload sizes across your entire site
- Bandwidth Reduction – Cut image bandwidth usage in half compared to JPEG, reducing hosting costs and improving load times for visitors on slower connections
How It Works
- Enable the module and configure your quality and format preferences
- Upload a JPEG or PNG image through the Media Library or any editor
- The image is automatically converted to AVIF format during the upload process
- If the AVIF version is larger than the original (rare, but possible with very small files), conversion is skipped to avoid bloat
- The AVIF file replaces the original in your Media Library, or the original is kept as a backup depending on your settings
- Conversion stats (file count and total bytes saved) are tracked automatically
Where to Find It
Location: Upload images through Media → Add New (upload.php) or the media button in any editor. Conversion happens automatically during upload.
Configure the module settings in Switchboard → Modules → Media → AVIF Conversion.
Server Requirements
AVIF conversion requires server-side support via one of these libraries:
| Library | Minimum Version | How to Check |
|---|---|---|
| GD Library with AVIF | PHP 8.1+ | gd_info() shows AVIF support |
| ImageMagick with AVIF | 7.0.25+ with AVIF delegate | Imagick extension with AVIF format listed |
The module checks your server’s capabilities on activation and displays an admin notice if AVIF support is not available. Contact your hosting provider to enable AVIF support if needed.
AVIF conversion requires PHP 8.1 or higher with GD AVIF support, or ImageMagick 7.0.25+ with the AVIF delegate. If your server does not meet these requirements, you will see an admin notice explaining what is missing.
Settings
| Setting | Type | Default | Description |
|---|---|---|---|
| Convert JPEG Files | Toggle | Yes | Convert uploaded JPEG images to AVIF |
| Convert PNG Files | Toggle | Yes | Convert uploaded PNG images to AVIF (transparency is preserved) |
| AVIF Quality | Range (0-99) | 63 | Compression quality level. AVIF achieves excellent quality at lower values than JPEG or WebP |
| Encoding Speed | Range (0-10) | 6 | Lower values produce smaller files but take longer to encode. Higher values are faster but produce larger files |
| Original Files | Select | Delete original | Keep the original file as a backup, or delete it to save disk space |
| Exclusion Suffix | Text | -sbe | Images with this suffix in the filename will skip conversion (e.g., photo-sbe.jpg) |
Quality Settings Guide
AVIF uses a different quality scale than JPEG. Lower numbers produce better results relative to JPEG at the same setting:
| Quality | File Size | Visual Quality | Best For |
|---|---|---|---|
| 30-45 | Smallest | Good for web | Thumbnails, backgrounds, decorative images |
| 50-65 | Balanced | Excellent | General use (recommended range) |
| 70-85 | Larger | Near-lossless | Photography, hero images, product shots |
| 90-99 | Largest | Virtually lossless | Archival, print-quality images |
Recommended: 63 – This is the default and provides an excellent balance of quality and compression for most use cases.
Encoding Speed
The encoding speed setting controls the trade-off between compression efficiency and processing time:
| Speed | Compression | Encoding Time | Best For |
|---|---|---|---|
| 0-2 | Maximum compression | Slowest | Batch processing, maximum savings |
| 3-5 | Good compression | Moderate | Balanced approach |
| 6-8 | Standard compression | Fast | General use (default: 6) |
| 9-10 | Minimal compression | Fastest | High-traffic upload scenarios |
Excluding Files from Conversion
Add the exclusion suffix to any filename to skip AVIF conversion:
photo.jpg → Converted to photo.avif
photo-sbe.jpg → Stays as photo-sbe.jpg (skipped)
logo-sbe.png → Stays as logo-sbe.png (skipped)This is useful for images where you specifically need the original format, such as images used in email templates or served to applications that do not support AVIF.
Compression Comparison
| Original Format | Typical AVIF Savings | Example |
|---|---|---|
| JPEG (500 KB) | 40-50% smaller | ~250-300 KB as AVIF |
| PNG (1 MB) | 50-70% smaller | ~300-500 KB as AVIF |
| Large photo (2 MB JPEG) | 45-55% smaller | ~900 KB - 1.1 MB as AVIF |
AVIF supports transparency just like PNG. When converting PNG files with transparent backgrounds, the transparency is fully preserved in the AVIF output.
WebP Conversion Conflict
If you have the WebP Conversion module also enabled, a warning will appear. Both modules attempt to convert images during the upload process, which can cause conflicts. Choose one format:
- AVIF – Better compression (up to 50% smaller than JPEG), newer format with growing browser support
- WebP – Slightly less compression (25-34% smaller than JPEG), wider browser support (97%+)
For most sites launching today, AVIF is the better choice. If you need maximum browser compatibility with older devices, WebP remains a safe option.
FAQ
Why aren’t my images converting to AVIF?
Check the module settings page for server support status. AVIF conversion requires PHP 8.1+ with GD AVIF support or ImageMagick 7.0.25+ with the AVIF delegate. If your server does not meet these requirements, contact your hosting provider. Also verify that the module is enabled and that your image filenames do not include the exclusion suffix.Is AVIF supported by all browsers?
AVIF is supported by Chrome, Firefox, Edge, Opera, and Safari 16+. As of 2026, browser support covers approximately 95% of global users. For the small percentage on older browsers, WordPress serves the original format if available, or you can use a CDN with automatic format negotiation.Can I use both AVIF and WebP conversion at the same time?
It is not recommended. Both modules hook into the upload process and can conflict with each other. Choose one format based on your needs – AVIF for maximum compression or WebP for broader legacy browser support.Does this convert existing images in my Media Library?
No. AVIF conversion only applies to newly uploaded images. To convert existing images, enable this module and then use the Regenerate Thumbnails module to reprocess your media library.What happens if the AVIF file is larger than the original?
The module automatically skips conversion when the AVIF output would be larger than the original file. This can happen with very small images or images that are already heavily compressed. The original file is kept as-is.This module only converts images during upload. Existing images in your Media Library are not affected. To optimize your entire library, enable AVIF Conversion and then use the Regenerate Thumbnails module.
Get access to all 166 modules with a single license