Linux 软件免费装

Force WebP

开发者 Qrzysio
更新时间 2026年8月23日 18:59
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

speed media images optimization webp

下载

1.1 1.1.1 1.1.2 1.1.3 1.0.1 1.0.2 1.0.3 1.1.4 1.2 1.3 1.4 1.5 1.6

详情介绍:

This plugin converts every uploaded JPG or PNG image into modern WebP format to improve performance and reduce file size. Key features:

安装:

Requirements:

升级注意事项:

1.6 Fixes a bug where WebP files could be recorded with .jpg/.png names or mime types, breaking thumbnails or previews. Adds a repair tool for affected sites, ICC profile preservation, a keep-original option, and WordPress 7.1 support.

常见问题:

My thumbnails are broken: the full image opens, but the grid shows a placeholder. What happened?

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.

Does the plugin modify existing media?

No. Conversion affects only newly uploaded images. The repair tool only corrects wrong filenames in the database.

Should I enable "Keep original JPG/PNG"?

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.

Does the plugin support GIFs?

No. Only JPG/JPEG and PNG are supported. Other formats remain unchanged.

What happens if the server does not have Imagick with WebP support?

The plugin deactivates itself and displays an admin notice "Please enable Imagick with WebP support on your server".

How can I change the compression quality?

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.

Does the plugin generate WordPress thumbnails correctly?

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.

Can I go back to the old conversion path?

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.

Is it compatible with WordPress 7.1 client-side media processing?

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.

What happens to very large images?

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.

更新日志:

1.6 1.5 1.4 1.3 1.2 1.1.4 1.1.3 1.1.2 1.1.1 1.1 1.0.3 1.0.2 1.0.1 1.0