| 开发者 | Qrzysio |
|---|---|
| 更新时间 | 2026年8月23日 18:59 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Versions 1.2-1.5 could store thumbnail filenames ending in .jpg or .png while the files on disk were already converted to WebP. This happened when another plugin re-saved the attachment metadata during the upload - most visibly when uploading through the media modal of a page builder. Version 1.6 fixes the cause and ships a repair tool in Tools → Force WebP that rewrites the stored filenames to match the files on disk. It does not create or delete any file.
No. Conversion affects only newly uploaded images. The repair tool only corrects wrong filenames in the database.
It is off by default, which is what most people install this plugin for. Bear in mind that with originals deleted, a WebP file is the only copy of the image: if a thumbnail is ever lost there is nothing to regenerate it from. If disk space is not a concern, keeping the originals gives you a fallback. Either way, keep backups.
No. Only JPG/JPEG and PNG are supported. Other formats remain unchanged.
The plugin deactivates itself and displays an admin notice "Please enable Imagick with WebP support on your server".
The default is 95%. You can change it in Tools → Force WebP. The new quality will be applied to all images uploaded after you update the setting.
Yes. Since 1.6 WordPress writes the intermediate sizes as WebP itself (via the image_editor_output_format filter), so thumbnails are encoded only once and their filenames can never disagree with the metadata.
Yes:
add_filter( 'force_webp_use_core_output_format', '__return_false' );
WordPress will then create JPG/PNG thumbnails and the plugin will convert them afterwards, as in 1.5.
Yes. Conversion runs on wp_generate_attachment_metadata, which fires whether the image sizes were created in the browser or on the server, so images are still converted to WebP. On top of that, the self-healing metadata check (added in 1.6) reconciles the stored filenames with the files on disk regardless of which upload path created them, so browser-side processing does not leave broken thumbnails.
If a maximum width is configured, large images are automatically resized before thumbnails are generated. WordPress backup originals are removed to avoid duplicate files, unless "Keep original JPG/PNG" is enabled.
image_editor_output_format), so thumbnails are encoded once instead of being generated as JPG and re-encoded. Faster uploads, better quality, lower memory usage. Revert with the force_webp_use_core_output_format filter.