| 开发者 | tanupom |
|---|---|
| 更新时间 | 2026年7月15日 12:39 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
.htaccess tricks, no duplicate storage.
It uses your server's Imagick (ImageMagick) build to do the conversion, so heavy lifting stays on the server and the plugin itself stays small.
What it does
wp_handle_upload filter, replacing the original in place. If your server cannot output WebP (or HEIC/HEIF delegates are missing), the upload is passed through unchanged..webp URLs in your post content and options. Serialized options (widgets, theme mods) are handled with a serialize-safe replacement so the data does not break.tanupom-in-place-converter-for-webp folder to /wp-content/plugins/, or install it from the Plugins screen.No. This plugin is deliberately "in place": it converts the originals to WebP and deletes the old files. This keeps your library to a single set of files. Make a backup before running it.
Not from within the plugin. Restore from your backup if you need the originals back. This is why a backup is required before conversion.
Your Imagick build can't output WebP. Ask your host to enable WebP support in ImageMagick/Imagick, or use a server that provides it.
Yes, since 0.2.0. New uploads of JPEG, PNG, BMP, HEIC, and HEIF go through the wp_handle_upload filter and are written to disk as WebP, replacing the original. The same conversion settings (quality, lossless PNG, strip metadata) are used.
If your server's Imagick build cannot output WebP, or HEIC/HEIF delegates are missing, the upload is passed through unchanged so nothing breaks.
After conversion, run Run reference replacement. It rewrites old image URLs to the new .webp URLs in post content and options, including serialized options, using a serialize-safe replacement.
The two conversion paths cover different formats:
tanupom_ipc_replace_post_types filter were renamed to match.load_plugin_textdomain() call was removed.wp_handle_upload filter, with graceful fallback when the server cannot output WebP.post_content should be scanned during URL replacement.tanupom_ipc_replace_post_types filter so developers can override the scanned post types programmatically.