| 开发者 |
mitspl
wpaluchmits |
|---|---|
| 更新时间 | 2026年7月30日 19:43 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
imageavif(). The plugin detects support automatically and warns you if AVIF is unavailable on your server.
Apache .htaccess Configuration
One click adds mod_rewrite rules to your .htaccess so Apache automatically serves .webp files to browsers that support them, with no code changes required in your theme.
Image Dimensions Scanner
Detects images ≥ 1600 px wide that are used in posts or as featured images. Helps you find oversized images that slow down page loads, along with their file sizes, dimensions, and WebP/AVIF conversion status.
Site Audit
Scans your site for the most common technical issues: missing alt text, oversized images, missing SSL, outdated plugins, pages without Open Graph tags, and more. Results include actionable recommendations.
Dashboard Widget
A compact stats panel on the WordPress admin dashboard showing compression savings, WebP/AVIF conversion counts, and a link to the optimizer.
Requirements
mod_rewrite (for automatic WebP serving via .htaccess)mits-image-optimizer folder to /wp-content/plugins/.No. Original images are never deleted. WebP and AVIF files are saved alongside originals with a .webp or .avif extension (e.g. photo.jpg → photo.jpg.webp).
The AVIF tab will display a warning with the reason (e.g. Imagick version too old, or GD imageavif() not available). WebP conversion and compression still work independently of AVIF support.
Yes. The plugin only modifies image files in your uploads directory and your .htaccess. It is compatible with all major caching plugins.
It is not recommended. Run one batch job at a time to avoid server load spikes and to keep progress tracking accurate.
Yes. The plugin wraps its rules in clearly marked comment blocks (# BEGIN MITS WebP … # END MITS WebP). You can remove them manually or via the plugin button.
Auto-compression and bulk compression support JPG, JPEG, PNG, and GIF. WebP and AVIF conversion support the same formats. GIF files are converted to static WebP/AVIF (animation is not preserved).
Accept: image/webp) and checks the returned Content-Type, then fetches the home page to see whether .webp URLs actually reach the HTML, and detects a shared cache (Varnish/CDN/proxy) in front of the site. This answers "does my server support WebP" with what is really delivered instead of what is configured - a site can have every .webp file generated and still serve PNG.Accept negotiation is unreliable there), and disables .htaccess serving on servers that never read .htaccess. Page caches are purged afterwards and the test is re-run so the end state is visible.<img src="..."> themselves (ACF fields, term thumbnails, sliders) leave the browser no choice but to download the full-size file - a 900px original for a 190px slot. Lazy-loaded images without a srcset now get one via WordPress core (wp_image_add_srcset_and_sizes()), plus sizes="auto" on WP 6.7+, so the browser picks by the real layout size.src is now rewritten to .webp as well, not just srcset. Images rendered without a srcset (single sizes, theme calls) kept their JPG/PNG URL whenever the .htaccess/Nginx rules were not in play. Done in wp_get_attachment_image_attributes on purpose: rewriting wp_get_attachment_image_src would make WordPress fail to match the file names in the attachment metadata and drop the whole srcset..webp URLs are swapped to .avif for browsers that send Accept: image/avif, but only when the sibling .avif file exists - other browsers keep receiving WebP. Distinct URLs keep it safe behind Cloudflare/CDN. Aimed at sites whose media library is already WebP-primary. Default behavior is unchanged, so updating does not alter serving on existing installs..avif siblings.\* przed Version: w nagłówku pluginu - WordPress nie odczytywał numeru wersji, przez co wyświetlał "0.0" w powiadomieniu o aktualizacji.