
SEV WebP Migrator for W3TC is a companion plugin for W3 Total Cache that finishes the job once W3TC ImageService has converted an image to WebP.
No changes to .htaccess, mod_rewrite, or web server configuration are required. Instead, it writes the replacement back into the database once, unlike a runtime content filter that swaps URLs on every request: as soon as W3TC marks an attachment as converted, every occurrence of that image’s URL in post_content across the whole site is permanently replaced, from its original extension (jpg/jpeg/png/gif) to .webp. The attachment’s own record (attached file, metadata, mime type) is updated to match, so the Media Library and REST API stay consistent too.
Optionally, once an image has been fully replaced, the plugin can delete the now-unused original source files from disk to reclaim storage space.
This is an independent, unofficial add-on and is not affiliated with, endorsed by, or sponsored by BoldGrid / W3 EDGE, the makers of W3 Total Cache. “W3 Total Cache” is a trademark of its respective owner and is used here only to describe compatibility.
Features
post_content, across all posts..webp counterpart has been confirmed to exist on disk.How it works
w3tc_imageservice post meta as converted.post_content across all posts for the old URLs and replaces them with the .webp versions directly in the database._wp_attached_file, _wp_attachment_metadata, and post_mime_type are updated to point at the .webp files.Requirements
Limitations
This plugin does not convert images to WebP — conversion is handled entirely by W3 Total Cache ImageService. It only reacts once W3TC reports an image as converted.
This plugin only handles WebP. AVIF is not supported: W3 Total Cache only offers AVIF conversion in its paid Pro version, and this plugin’s free-tier ImageService integration only ever sees WebP conversions.
Deleting source images is permanent and cannot be undone by this plugin. Keep backups before enabling automatic deletion.