AVIF WordPress 2026: 완전 설정 가이드 [플러그인 + 코드]
WordPress에 AVIF 설정: 플러그인 설치, 코드 스니펫, CDN 통합. WordPress 50% 빠르게 →
WordPress AVIF Support
WordPress added native AVIF upload support in version 6.1 (November 2022), but optimal implementation requires additional configuration.
Out of the box, WordPress 6.1+ allows AVIF file uploads through the media library. However, the CMS doesn't automatically convert existing images or generate AVIF thumbnails—you need plugins or custom code for that.
Server requirements also matter. Your hosting must have AVIF support in the image processing library (typically ImageMagick or GD). Many shared hosts now support this, but verification is recommended.
Plugin Options
Several excellent plugins handle AVIF conversion and delivery.
- ShortPixel: Converts images to AVIF on upload or in bulk. Includes CDN option for automatic format delivery.
- Imagify: From WP Rocket team. WebP and AVIF conversion with smart serving based on browser support.
- EWWW Image Optimizer: Local conversion option (no external API). Supports AVIF with proper server configuration.
- Converter for Media: Free option for AVIF/WebP conversion with .htaccess-based serving.
💡 프로 팁
ShortPixel and Imagify offer the best balance of features and ease of use for most WordPress sites.
Server Configuration
Proper server configuration ensures AVIF files are served correctly.
This configuration checks if an AVIF version of each image exists and serves it to supporting browsers automatically. The original JPEG/PNG remains the fallback.
# Apache .htaccess for AVIF serving
<IfModule mod_rewrite.c>
RewriteEngine On
# Check if AVIF version exists and browser supports AVIF
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{REQUEST_FILENAME} (.+)\.(jpe?g|png|gif)$
RewriteCond %{REQUEST_FILENAME}.avif -f
RewriteRule ^(.+)\.(jpe?g|png|gif)$ $1.$2.avif [T=image/avif,E=avif:1,L]
</IfModule>
# Nginx configuration
location ~* ^(.+)\.(jpe?g|png|gif)$ {
set $avif_suffix "";
if ($http_accept ~* "image/avif") {
set $avif_suffix ".avif";
}
try_files $uri$avif_suffix $uri =404;
}WooCommerce Integration
E-commerce sites benefit most from AVIF. Here's WooCommerce-specific implementation.
WooCommerce generates multiple image sizes for products: thumbnails, catalog images, and single product images. Ensure your optimization plugin converts all registered image sizes to AVIF.
Product galleries particularly benefit from AVIF. A typical gallery with 5-10 images can see 2-4MB savings, dramatically improving product page load times.
<?php
// Functions.php: Register AVIF support for WooCommerce images
add_filter('woocommerce_product_get_image', function($image, $product) {
// Plugin-specific: Modify image HTML to include AVIF srcset
return apply_filters('avif_product_image', $image, $product);
}, 10, 2);