Force WebP

Description

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

Key features:
– automatic conversion of JPG and PNG images to WebP on upload
– correct generation of all WordPress image thumbnails
– configurable WebP quality level
– optional maximum image width (original images are resized before thumbnails are generated)
– automatic removal of original JPG/PNG files to save disk space
– full compatibility with WordPress “big image scaling”
– automatic alt text generation based on the filename
– filename sanitization and collision-safe renaming

All settings apply only to newly uploaded images. Existing media files are not modified.

Configuration

You can configure the plugin in Tools Force WebP.

Available options:
– WebP quality (0–100): controls compression quality for newly uploaded images
– Max width (px, optional): limits the maximum width of original images before WordPress generates thumbnails (0 = disabled)

All settings affect only images uploaded after saving the configuration.

Installation

  1. Download the plugin or install it from the WordPress Plugin Directory.
  2. Activate it via the Plugins menu in WordPress.
  3. From now on, any JPG or PNG file uploaded to the Media Library will:
    • be converted to WebP
    • have the original file removed
    • receive an alt text based on the filename
    • be renamed to avoid overwriting if duplicates exist

FAQ

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 shows an admin notice. Please enable Imagick with WebP support on your server.

How can I change the compression quality?

The default is 90%. 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. Images are converted to WebP only after WordPress finishes generating all intermediate image sizes, so thumbnails work exactly as expected.

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.

Reviews

November 21, 2025 1 reply
The plugin is great — the images are really converted to WebP and the original files are deleted as expected. Congratulations to the developer. But I noticed two bugs: it seems to interfere with the generation of the site’s thumbnails, so the entire site ends up loading the full-size image only. Also, the quality level setting doesn’t work. I tested it by setting it to 10 and then to 90, and the output stayed the same. Another idea would be to add a maximum width limiter for images. For example, when I upload an image, I want it to be converted to WebP and also resized to a maximum width of 1000px (of course, this value should be configurable). It would be great to have this feature.
Read all 1 review

Contributors & Developers

“Force WebP” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Force WebP” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.3

  • Improved compatibility with other plugins by lowering upload hook priorities.
  • Other plugins can now safely set or override image title and alt text.
  • Minor internal code and stability improvements.

1.2

  • Fixed thumbnail generation issue (conversion now runs after metadata creation) – thanks to @koultti.
  • Added optional maximum image width setting for original uploads.
  • Integrated with WordPress big image scaling.
  • Automatic removal of WordPress backup original images.
  • Improved WebP quality handling (quality setting now reliably affects output).
  • Internal code cleanup and stability improvements.

1.1.4

  • Added a “Settings” link on the plugins list.
  • Added server WebP support status message on the settings page.

1.1.3

  • Typo fixed.

1.1.2

  • Changed minimum required PHP version to 8.1.
  • Changed minimum WordPress version to 6.5.

1.1.1

  • Improvements and small fixes.

1.1

  • Improved: plugin now checks whether Imagick is available on the server.

1.0.3

  • Fixed issue where PNG images without transparency were converted to fully transparent images.
  • Added configuration page in Tools Force WebP to set image quality.

1.0.2

  • Default WebP changed to 90%.

1.0.1

  • Added filename uniqueness handling for WebP files.

1.0

  • Initial release: convert JPG/PNG to WebP (90% quality), remove original files, rename files, and set alt text.