説明
I-PR AVIF Converter converts your new and existing images to AVIF directly on your server and serves them everywhere on the page. No cloud service, no API key, no monthly credits, no image limits.
AVIF files are typically 40-70% smaller than JPEG at the same visual quality. Smaller images mean a faster Largest Contentful Paint (LCP), better Core Web Vitals and less bandwidth.
Most image optimizers only replace images inside post content. I-PR AVIF Converter rewrites the whole page, so AVIF is also served for images in your theme header and footer, in Custom HTML blocks and widgets, in page builder templates, in custom fields and in Elementor section backgrounds.
Real production results
Measured on live sites running on Italian shared hosting (Aruba and Serverplan):
- dermopigmentazioneroma.it: 904 images, 721 MB saved (-68%), Mobile PageSpeed 80/100
- mangiaroma.com: 1,213 images, 804 MB saved (-70%), Desktop PageSpeed 97/100
- artmerlino.it: 371 images, 167 MB saved (-64%)
- apicolturalapegaia.it: 1,069 images, 135 MB saved (-69%)
- fnahospitalityroma.it: 432 images, 83 MB saved (-43%)
AVIF on every image of the page
- Gutenberg and the classic editor: image blocks, galleries, featured images.
- Hand-written HTML: Custom HTML blocks, HTML widgets, theme templates, header and footer. Absolute, relative (
/wp-content/uploads/...), protocol-relative, www and non-www URLs are all recognised. - Elementor: Image, Gallery, Text Editor and HTML widgets, gallery lightboxes, and section and container background images (desktop, tablet, mobile and hover). Backgrounds use CSS
image-set(), so browsers without AVIF support keep the original image. - Inline backgrounds:
background-imagein style attributes. - Lightboxes: Elementor, WordPress, Fancybox and
data-lightboxlinks open the AVIF full-size image.
Only the image tag is touched: it is wrapped in a <picture> element and the original <img> stays as the fallback. Scripts, SVG and the rest of your markup are left exactly as they are.
<picture>
<source srcset="image.avif" type="image/avif">
<img src="image.jpg" alt="...">
</picture>
How it works
- When you upload an image, the original and all its thumbnails are queued for conversion.
- A background job converts the queue with WP-Cron, with a fallback for hosts where WP-Cron is disabled. Page loads are never blocked.
- The Bulk Scanner converts the images already in your Media Library.
- Images found in your pages that are not converted yet, for example files uploaded via FTP, are queued automatically.
- Visitors with a modern browser get AVIF, everyone else gets the original.
Your original files are never modified unless you explicitly enable “Delete originals”.
Built for shared hosting
- No cloud dependency. Conversion runs on your server with Imagick or GD. No accounts, no usage limits, no recurring costs.
- Adaptive batches. The plugin measures how fast your server converts images and adjusts the batch size automatically, so it does not cause timeouts.
- Memory guard. Before each image the plugin estimates the RAM it needs and postpones the image if memory is short. No fatal errors.
- Circuit breaker. If Imagick keeps failing, the plugin switches to GD and retries Imagick later on its own.
- Quarantine. Images that fail three times are set aside, and you can retry them from the dashboard.
Safe by design
- Smart skips. Animated GIFs and JPEG images with an HDR gain map (UltraHDR, Apple Adaptive HDR) are not converted, because AVIF would lose the animation or the HDR.
- CMYK handling. Print-ready CMYK JPEGs are converted to sRGB first, so colours are not inverted.
- One-click revert. “Delete generated images” removes every AVIF and WebP file the plugin created, without touching the originals and without uninstalling.
- Per-image control. Add
class="ipr-avif-skip"to any image to keep it as it is, or add?ipr-avif=offto a URL to preview the page without AVIF. - Skip patterns. Exclude files or folders with wildcards, for example
logos/*.png. - WordPress 7.1 ready. Compatible with client-side media processing.
- Clean uninstall. Removing the plugin deletes its table, options and scheduled jobs.
Dashboard and CDN
A stats page shows converted files, savings, failure rate and a performance score. After each batch the plugin can purge Cloudflare and notify WP Rocket, LiteSpeed Cache and W3 Total Cache, and it regenerates Elementor CSS automatically.
Requirements
At least one AVIF encoder on the server:
- Imagick 7.0.25 or newer with libheif and AV1 support, or
- PHP 8.1 or newer with GD compiled with libavif (
imageavif()available).
The settings page shows which encoder is available on your server. Optional WebP copies can be generated as an extra fallback.
External Services
This plugin optionally communicates with the Cloudflare API (api.cloudflare.com) to purge CDN cache after batch image conversion.
This feature is disabled by default and only activates if you explicitly enable “Cloudflare CDN Integration” in the plugin settings and provide your own Cloudflare Zone ID and API Token.
No data is sent to Cloudflare unless this feature is manually configured. The only data transmitted are the public URLs of newly converted AVIF images, which Cloudflare needs to purge from its cache.
- Cloudflare service: https://www.cloudflare.com
- Cloudflare Terms of Service: https://www.cloudflare.com/terms/
- Cloudflare Privacy Policy: https://www.cloudflare.com/privacypolicy/
All image conversion is performed locally on your server. No images or personal data are ever sent to external services.
スクリーンショット




インストール
- Install the plugin from Plugins > Add New, or upload the
ipr-avif-converterfolder to/wp-content/plugins/. - Activate it. The default settings are applied automatically.
- Open Settings > I-PR AVIF Converter and check that an encoder is available.
- Click Scan Library to convert the images you already have.
- Clear your page cache once, so cached pages pick up the AVIF images.
No API keys and no registration.
Recommended settings
The defaults work on most shared hosting:
- Quality: 70 (recommended range 65-75)
- Images per batch: 3 (adjusted automatically)
- Cron interval: 5 minutes
- Full-page mode: on
- Auto-queue page images: on
FAQ
-
Very likely. It runs in production on Aruba and Serverplan, two of the most restrictive shared hosting environments in Italy. You need PHP 8.1 or newer and Imagick with AVIF support or GD with
imageavif(). -
What if my server cannot create AVIF files?
-
The settings page tells you. Nothing is converted and your site keeps serving the original images, so nothing breaks.
-
Does it slow down my site?
-
No. Conversion runs in the background. On the front end the plugin only checks whether an AVIF file exists next to each image, which is a very fast file check.
-
Does it convert images I added with custom HTML or in my theme?
-
Yes. With full-page mode (on by default) every image of the page is processed, not only post content. If such an image is in your uploads folder but has not been converted yet, it is queued automatically.
-
Does it work with Elementor?
-
Yes. Widgets, galleries, lightboxes and section or container background images are all served as AVIF. Elementor CSS is regenerated automatically when new AVIF files are created.
-
Will the picture tag break my layout?
-
In most themes it does not. If one theme styles images with very specific selectors (for example
.box > img), addclass="ipr-avif-skip"to that image, or turn off full-page mode for that site. -
I updated the plugin but I still see JPG images. Why?
-
Your page cache is probably serving an older copy of the page. Clear your cache plugin and, if you use Elementor, regenerate its CSS from Elementor > Tools.
-
Does it change my original images?
-
No, unless you enable “Delete originals”. AVIF files are stored next to the originals, and the revert button removes them in one click.
-
Which browsers get AVIF?
-
Chrome 85+, Firefox 93+, Safari 16+ and Edge 121+. Other browsers get the original JPEG or PNG through the
<picture>fallback. -
Can I exclude specific images?
-
Yes. Use skip patterns in the settings (for example
logo.png,logos/*,2024/01/*.png), or addclass="ipr-avif-skip"to a single image. -
What happens if a conversion fails?
-
The image is retried up to three times. After that it goes to the quarantine list, where you can retry it. A failed image never blocks the rest of the queue.
-
Is it compatible with WooCommerce?
-
Yes. Product images, galleries and thumbnails are converted and served as AVIF. It is used in production on WooCommerce stores.
-
Does it support WebP?
-
Yes, as an option. AVIF is always the main format. If you enable WebP, the
<picture>element also includes a WebP source between AVIF and the original. -
What data does the plugin store?
-
One database table (
wp_ipr_avif_conversions) with conversion history for the stats page, plus a few options. Everything is removed when you delete the plugin. -
Is there a Pro version?
-
No. The plugin is fully functional and free.
貢献者と開発者
I-PR AVIF Converter – Automatic Image Optimization はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。
貢献者変更履歴
1.10.0 – October 15, 2026
- New: Full-page mode (default on). AVIF is now served for every image on the page, including hand-written HTML, Custom HTML blocks and widgets, theme header/footer, page builder templates and custom fields.
- New: Elementor section and container background images (desktop, tablet, mobile, hover) are served as AVIF through image-set(), with the original as fallback. Elementor CSS is regenerated after each conversion batch.
- New: Images found in pages that have no AVIF yet (e.g. uploaded via FTP) are queued automatically.
- New: Exclude a single image with class=”ipr-avif-skip”; preview a page without rewriting with ?ipr-avif=off.
- Improved: Image URLs are resolved in any form: absolute, root-relative (/wp-content/uploads/…), protocol-relative, www and non-www, URL-encoded.
- Improved: HTML is no longer re-serialized through DOMDocument. Only the image tag is wrapped; inline scripts, SVG viewBox and surrounding markup are left untouched.
- Improved: Malformed attributes (e.g. a quote turned into ” by wptexturize) no longer stop the rewriting of the rest of the page.
- Improved: The original pre-“-scaled” image (WordPress big image threshold) is now converted too.
- Fixed: The activation routine never ran, so default settings and the stats table were missing until settings were saved. Existing installs are repaired automatically on the next admin page load.
- Fixed: Failed conversions are now retried before quarantine instead of being dropped after the first error.
- Fixed: Inline background-image URLs in quotes produced a broken style attribute.
- Fixed: The “Pardon + re-queue” button in the quarantine list did nothing.
- Fixed: WebP copies are deleted together with the attachment.
1.9.12 – August 30, 2026
- Compatibility (WordPress 7.1): support for client-side media processing. WordPress 7.1 generates thumbnails in the browser and uploads them one by one after the initial upload, so wp_generate_attachment_metadata now fires twice — once with context ‘create’ before the sub-sizes exist, and again with ‘update’ once the upload is finalised. The queue now waits for the second pass instead of acting on the first. Previously, with “Delete originals” enabled, the source file could be removed while the upload was still in flight. The same fix also covers deferred sub-size generation on big-image uploads
- New: JPEG images carrying an HDR gain map (Google UltraHDR, Apple Adaptive HDR, Adobe Camera Raw/Lightroom/Photoshop) are now skipped. Transcoding them to AVIF discards the gain map and the served image loses its HDR — WordPress 7.1 skips format conversion for these files for the same reason
- Housekeeping: tested up to WordPress 7.1
1.9.11 – June 19, 2026
- Fix (critical): a fatal TypeError could crash sites (white screen) when a theme or page builder called wp_get_attachment_image() with a non-integer attachment ID — notably WoodMart’s Elementor widgets passing an empty string. The wp_get_attachment_image filter callback had strict parameter type-hints; since that core filter does not guarantee argument types, the hints have been relaxed and the input is now validated defensively. No change to conversion behaviour
1.9.10 – June 15, 2026
- Fix (regression): the shutdown background-processing fallback was disabled whenever a WP-Cron event was scheduled (introduced alongside 1.9.9’s self-healing scheduler). On hosts where WP-Cron is scheduled but never actually executes (e.g. DISABLE_WP_CRON with a missing or misconfigured system cron), this stopped the queue from processing even though the status showed “WP-Cron” active. The shutdown fallback is now always active as a safety net; it is throttled, skips during real cron runs, and exits immediately when the queue is empty, so it adds no overhead at steady state
1.9.9 – June 15, 2026
- Fix: the “plugin activated” welcome notice could not be dismissed — its dismiss link used an outdated action prefix (same class of issue as 1.9.7, on a GET link missed by that sweep), so the notice reappeared on every admin page. Dismissing now works and persists
- New: self-healing cron scheduling — the background conversion event is now re-registered automatically on load if it goes missing (common on hosts using DISABLE_WP_CRON with a system cron), so the queue runs reliably and the status correctly shows “WP-Cron” instead of falling back
1.9.8 – June 15, 2026
- Fix: removed a PERCENTILE_CONT SQL query in the RAM batch estimator that logged a harmless but noisy “WordPress database error” on every queue run under MySQL 8 and MariaDB (neither supports that syntax). Replaced with a portable percentile calculation — batch sizing behaviour is unchanged
- Housekeeping: bumped the declared “Requires PHP” to 8.1 to match the codebase (the plugin already uses PHP 8.1 syntax; the previous 7.4 declaration was inaccurate)
1.9.7 – June 15, 2026
- Fix: four admin action buttons (Export CSV, Reset stats, Clear log, Clear quarantine) were inoperative since 1.9.6 — their form action values were missed during the AVIF_ to IPR_AVIF_ prefix rename and no longer matched their registered hooks
- New: “Delete generated images (revert)” button — removes all plugin-generated AVIF/WebP files (only those sitting next to an original image) and clears the queue, without uninstalling. Originals are never touched
1.9.6 – April 28, 2026
- WordPress.org compliance: All internal prefixes renamed from
AVIF_toIPR_AVIF_(classes, constants, options, hooks, transients) - WordPress.org compliance: Text domain updated to
ipr-avif-converteracross all 174 instances - WordPress.org compliance: All option keys and hook names prefixed with
ipr_avif_
1.9.5 – April 21, 2026
- WordPress.org compliance: Rebranded to “I-PR AVIF Converter” for distinctive identity
- WordPress.org compliance: Maintained slug
avif-converterfor compatibility - WordPress.org compliance: Fixed lock file storage: now creates dedicated
/uploads/avif-converter/subdirectory - WordPress.org compliance: Added documentation clarifying DOM-based HTML escaping in output methods
1.9.4
- Added: Complete
uninstall.php: removes all database tables, options, transients, and WP-Cron jobs on plugin removal. Zero ghost data. - Added: Clear UI warning for “Delete Originals” option (irreversible action)
1.9.3
- Fixed: PHP 8.2+ compatibility: removed deprecated
mb_convert_encoding()with HTML-ENTITIES in DOMDocument handling. No functional changes, resolves deprecation warnings on PHP 8.2+.
1.9.2
- Fixed: Elementor gallery lightbox now serves AVIF for full-size images, not just thumbnails
- Added: Support for Fancybox, WP native galleries, and generic
data-lightboxattributes
1.9.1
- Fixed: Animated GIFs are now correctly preserved: binary frame-count detection prevents conversion to broken static AVIF
1.9.0
- Added: AIMD (Additive Increase Multiplicative Decrease) adaptive batch processing
- Added: EWMA-based timing prediction with pre-flight batch size reduction
- Added: Performance Score dashboard panel
- Added: Core Web Vitals proxy metrics (CWV)
- Added: Telemetry buffer (last 200 events with fail rate tracking)
- Changed: Average compression ratio improved to 64-68%
1.8.0
- Added: Real-time telemetry dashboard with conversion charts
- Added: CDN integration (Cloudflare automatic cache purge)
- Added: Bulk scanner for existing media library
- Added: Performance Score calculation
1.0.0
- Initial release
- Automatic JPEG/PNG AVIF conversion via WP-Cron
<picture>tag output with automatic browser fallback- Dual encoder support: Imagick and GD
- Admin settings page with encoder status
- Background queue processing
