plugin-icon

AVIF Local Support

제작자: David Degner·
High-quality AVIF image conversion for WordPress — local, quality-first.
버전
0.4.9
활성화된 설치 항목
10
최근 업데이트일
Dec 17, 2025

Built by a Boston photographer who needed it for their own portfolio. This plugin prioritizes image quality over everything else — no subscriptions, no external services.

Features

  • Local Processing — All conversion happens on your server. No external API calls. Works great on a shared CPU with 2GB RAM.
  • Quality First — Uses LANCZOS resizing, preserves ICC color profiles, and keeps EXIF/XMP/IPTC metadata intact.
  • Fully Tunable — Control quality (0–100), speed (0–10), chroma subsampling (4:2:0, 4:2:2, 4:4:4), and bit depth (8/10/12-bit).
  • Smart Fallback — Serves AVIF to supported browsers, JPEG to everyone else via picture elements.
  • Automatic Conversion — Convert on upload or via daily scheduled background scans.

How It Works

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.

WP-CLI Commands

Manage AVIF conversions from the command line.

Status

Show system status and AVIF support diagnostics:

wp avif status wp avif status --format=json

Convert

Convert JPEG images to AVIF format:

wp avif convert --all wp avif convert 123 wp avif convert --all --dry-run

Options:

  • <attachment-id> — Specific attachment ID to convert
  • --all — Convert all attachments missing AVIF versions
  • --dry-run — Show what would be converted without actually converting

Statistics

Show AVIF conversion statistics:

wp avif stats wp avif stats --format=json

Logs

View or clear conversion logs:

wp avif logs wp avif logs --limit=50 wp avif logs --clear

Options:

  • --clear — Clear all logs
  • --limit=<number> — Number of logs to show (default: 20)

Delete

Delete AVIF files for an attachment or all attachments:

wp avif delete 123 wp avif delete --all --yes

Options:

  • <attachment-id> — Attachment ID to delete AVIF files for
  • --all — Delete all AVIF files in the media library
  • --yes — Skip confirmation prompt when using –all

For more information, visit wp-cli.org.

Server Setup

The plugin supports three conversion engines, in order of preference:

ImageMagick CLI (Fastest, Recommended)

Uses the ImageMagick command-line binary directly:

  • System binary: ImageMagick 7.x built with HEIF/AVIF support (via libheif)
  • No PHP extension required
  • Benefits: Fastest performance, LANCZOS resizing, full metadata preservation (EXIF, XMP, IPTC, ICC)
  • Typical paths: /usr/bin/magick, /usr/local/bin/magick, or Homebrew on macOS

To verify AVIF support:

magick -list format | grep -i avif

Imagick PHP Extension (High Quality)

Uses the PHP Imagick extension:

  • PHP extension: imagick
  • System libraries: ImageMagick built with HEIF/AVIF support (via libheif)
  • Benefits: LANCZOS resizing, full metadata preservation (EXIF, XMP, IPTC, ICC), color profile handling

To install on Ubuntu/Debian:

apt install php-imagick imagemagick libheif-dev

GD Library (Fallback)

Uses PHP’s built-in GD library:

  • PHP extension: gd built with AVIF support (provides imageavif on PHP 8.1+)
  • Note: Some distro builds omit AVIF support; limited metadata preservation

MIME Type Configuration

Ensure your web server is configured to serve .avif files as image/avif.

Documentation

Contributing

Contributions welcome! Please submit issues and pull requests on GitHub.

License

GPL v2 or later — View License

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 6.9
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.