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

  1. Enable the module and configure your quality and format preferences
  2. Upload a JPEG or PNG image through the Media Library or any editor
  3. The image is automatically converted to AVIF format during the upload process
  4. If the AVIF version is larger than the original (rare, but possible with very small files), conversion is skipped to avoid bloat
  5. The AVIF file replaces the original in your Media Library, or the original is kept as a backup depending on your settings
  6. 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:

LibraryMinimum VersionHow to Check
GD Library with AVIFPHP 8.1+gd_info() shows AVIF support
ImageMagick with AVIF7.0.25+ with AVIF delegateImagick 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

SettingTypeDefaultDescription
Convert JPEG FilesToggleYesConvert uploaded JPEG images to AVIF
Convert PNG FilesToggleYesConvert uploaded PNG images to AVIF (transparency is preserved)
AVIF QualityRange (0-99)63Compression quality level. AVIF achieves excellent quality at lower values than JPEG or WebP
Encoding SpeedRange (0-10)6Lower values produce smaller files but take longer to encode. Higher values are faster but produce larger files
Original FilesSelectDelete originalKeep the original file as a backup, or delete it to save disk space
Exclusion SuffixText-sbeImages 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:

QualityFile SizeVisual QualityBest For
30-45SmallestGood for webThumbnails, backgrounds, decorative images
50-65BalancedExcellentGeneral use (recommended range)
70-85LargerNear-losslessPhotography, hero images, product shots
90-99LargestVirtually losslessArchival, 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:

SpeedCompressionEncoding TimeBest For
0-2Maximum compressionSlowestBatch processing, maximum savings
3-5Good compressionModerateBalanced approach
6-8Standard compressionFastGeneral use (default: 6)
9-10Minimal compressionFastestHigh-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 FormatTypical AVIF SavingsExample
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.

PRO

Get access to all 166 modules with a single license

Upgrade to Pro