by David Degner on WordPress.org

AVIF Images — Configure AVIF delivery, conversion quality, speed, and engine settings
Built by a Boston photographer for site owners who care about visual quality and full control. This plugin prioritizes image quality over everything else — no subscriptions, no external services.
Front end: The plugin wraps your img tags in picture elements with an AVIF source. Browsers that support AVIF load the smaller, higher-quality file — others gracefully fall back to JPEG.
Conversion: Uses ImageMagick CLI (fastest), Imagick PHP extension (high quality), or GD Library (fallback) to convert JPEGs to AVIF on upload or via background jobs.
LQIP: Generates compact (~30 byte) ThumbHash placeholders that display instantly while images load.
The plugin supports three conversion engines, in order of preference:
Uses the ImageMagick command-line binary directly:
/usr/bin/magick, /usr/local/bin/magick, or Homebrew on macOSTo verify AVIF support:
magick -list format | grep -i avif
Uses the PHP Imagick extension:
To install on Ubuntu/Debian:
apt install php-imagick imagemagick libheif-dev
Uses PHP’s built-in GD library:
Ensure your web server is configured to serve .avif files as image/avif.
If you’re not sure what to install or upgrade, copy your Server Diagnostics from the plugin status/tools screen (or run wp avif status --format=json) and paste it into an LLM.
Example prompt:
I need AVIF support for WordPress. Based on this diagnostics output, give me step-by-step commands to install or upgrade ImageMagick, libheif, and PHP Imagick on my server.
After applying changes, verify with:
wp avif status
magick -list format | grep -i avifWP-CLI Commands
Manage AVIF conversions from the command line.
Show system status and AVIF support diagnostics:
wp avif status
wp avif status --format=json
Convert JPEG images to AVIF format:
wp avif convert --all
wp avif convert 123
wp avif convert --all --dry-run
Options:
— Specific attachment ID to convert--all — Convert all attachments missing AVIF versions--dry-run — Show what would be converted without actually convertingShow AVIF conversion statistics:
wp avif stats
wp avif stats --format=json
View or clear conversion logs:
wp avif logs
wp avif logs --limit=50
wp avif logs --clear
Options:
--clear — Clear all logs--limit= — Number of logs to show (default: 20)Delete AVIF files for an attachment or all attachments:
wp avif delete 123
wp avif delete --all --yes
Options:
— Attachment ID to delete AVIF files for--all — Delete all AVIF files in the media library--yes — Skip confirmation prompt when using –allManage LQIP (ThumbHash) placeholders:
wp lqip stats
wp lqip generate --all --force
wp lqip generate 123
wp lqip delete --all --yes
For more information, visit wp-cli.org.
Contributions welcome! Please submit issues and pull requests on GitHub.
GPL v2 or later — View License