Skip to content
Sign in

WebP Express

Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP.

Not scanned yet WordPress plugin 300k installs

Install in

No install steps yet

Follow the steps on the source page.

More than 9 out of 10 users are using a browser that is able to display webp images. Yet, on most websites, they are served jpeg images, which are typically double the size of webp images for a given quality. What a waste of bandwidth! This plugin was created to help remedy that situation. With little effort, WordPress admins can have their site serving autogenerated webp images to browsers that supports it, while still serving jpeg and png files to browsers that does not support webp.

The image converter

The plugin uses the WebP Convert library to convert images to webp. WebP Convert is able to convert images using multiple methods. There are the “local” conversion methods: imagick, cwebp, vips, gd. If none of these works on your host, there are the cloud alternatives: ewww (paid) or connecting to a WordPress site where you got WebP Express installed and you enabled the “web service” functionality.

The “Serving webp to browsers that supports it” part.

The plugin supports different ways of delivering webps to browsers that supports it:

  1. By routing jpeg/png images to the corresponding webp – or to the image converter if the image hasn’t been converted yet.
  2. By altering the HTML, replacing image tags with picture tags. Missing webps are auto generated upon visit.
  3. By altering the HTML, replacing image URLs so all points to webp. The replacements only being made for browsers that supports webp. Again, missing webps are auto generated upon visit.
  4. In combination with Cache Enabler, the same as above can be achieved, but with page caching.
  5. You can also deliver webp to all browsers and add the webpjs javascript, which provides webp support for browsers that doesn’t support webp natively. However, beware that the javascript doesn’t support srcset attributes, which is why I haven’t added that method to the plugin (yet).

The plugin implements the “WebP On Demand” solution described here and builds on a bunch of open source libraries (all maintained by me):
– WebP Convert: For converting images to webp
– WebP Convert Cloud Service: For the Web Service functionality
– DOM Util for WebP: For the Alter HTML functionality
– Image MimeType Guesser: For detecting mime types of images.
– HTAccess Capability Tester: For testing .htaccess capabilities in a given directory, using live tests
– WebP Convert File Manager: For browsing conversions and triggering conversions.
– Exec With Fallback: For emulating exec() on systems where it is disabled (using proc_open(), passthru() or similar alternatives).

Benefits

  • Much faster load time for images in browsers that supports webp. The converted images are typically less than half the size (for jpeg), while maintaining the same quality. Bear in mind that for most web sites, images are responsible for the largest part of the waiting time.
  • Better user experience (whether performance goes from terrible to bad, or from good to impressive, it is a benefit).
  • Better ranking in Google searches (performance is taken into account by Google).
  • Less bandwidth consumption – makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
  • Currently ~97% of all traffic are done with browsers supporting webp.
  • It’s great for the environment too! Reducing network traffic reduces electricity consumption which reduces CO2 emissions.

Limitations

Supporting WebP Express

Bread on the table don’t come for free, even though this plugin does, and always will. I enjoy developing this, and supporting you guys, but I kind of need the bread too. Please make it possible for me to continue wasting time on this plugin:

Supporters of WebP Express

Persons who recently contributed with ko-fi – Thanks!

  • 20 Sep: Greg
  • 5 Aug: Abilio Varjao
  • 23 Mar: hung minh dang
  • 5 Jan: Joel
  • 24 Dec 2025: Patrick Müller

Persons who recently contributed on github sponsors – Thanks!
* 16 Dec: kcrlost
* 16 Dec: Yakovos Frountas (Greece)

Persons who contributed with extra generously amounts of coffee / lifetime backing (>80$) – thanks!:

  • Patrick Müller ($250)
  • Max Kreminsky ($115)
  • Justin – BigScoots ($105)
  • Bill Vallance ($102)
  • Joel ($100)
  • Label Vier ($100)
  • Sebastian ($99)
  • Tammy Lee ($90)

Written by Joobi from the project's own listing. See the source page

imagesperformancewebp
18 Oct 2026
Version 0.25.16 released. Not scanned yet.

0.25.16

(released 18 Oct 2026)
* Fixed vulnerability in dom parser library used for altering html. Credit goes to Jakub Herman for discovering the problem. Also fixed a loophole that made it possible to use the web service (if activated) with carefully crafted inputs, even without an api key. Thanks to the third party that found and reported this to the WordPress security team – and thanks to the security team for bringing the issue to my attention

0.25.15

(released 19 May 2026)
* Fixed medium security problem with the WPC converter and got rid of some deprecated warnings on newer PHP versions (thanks to hostep from Belgium, dmitryuk from Kazakhstan and AH72KING from Pakistan for those contributions to the webp-convert library)

0.25.14

(released 25 December 2025)
* Fixed issue that the delete images feature also deleted webp-images that was uploaded as such, when webp-express was configured to store converted images in same folder as originals (not the default option). Also fixed conversion triggered by redirection, which broke on a few systems in a recent update, causing images in the media library not to appear. It may however still be a problem on a very few systems. In that case: Simply disable “Enable redirection to converter” and “Create webp files upon request” and submit an issue.

0.25.13

(released 25 December 2025)
* It is no longer a requirement on Nginx to modify redirection rules by adding a “hash” parameter. This was briefly required in 0.25.10-12. Btw, thanks Patrick Müller, for an extraordinary large donation on Christmas Eve – on top of the recent security fix that he originated. When I see engagement like that, it makes it meaningful for me to prioritize this project

0.25.12

(released 22 December 2025)
* Added notification for users on Nginx which uses redirect rules to change their rewrite rules manually. They must now pass a “hash” parameter in the querystring to the WebP conversion script. Thanks to Luka Paunović for bringing the issue to my attention and updating the README.

0.25.11

(released 22 December 2025)
* Fixes .htaccess rules for redirecting to converter. The bug was introduced in 0.25.10. It caused the conversion not to work on some systems. Thanks to Jon Wallace for reporting the issue on github and assisting in the debugging.

(released 15 December 2025)
* Security fix: Config file was exposed on systems running on NGINX. Herr Patrick Müller from Switzerland for creating a patch as well as Rune Philosof from Denmark for improving it. Some credit also goes to myself for perfecting the patch. Sorry for slacking on the maintenance. There are good reasons for this, but I can and will do better in the future

0.25.9

(released 7 April 2024)
* Bugfix: Fixed ewww conversion method after ewww API change

0.25.8

(released 20 October 2023)
* Bugfix: Depreciation warning on PHP 8.2 with Alter HTML. Thanks to @igamingsolustions for reporting the bug

0.25.7

(released 19 October 2023)
* Bugfix: Removed depreciation warning on settings screen, which was showing in PHP 8.2. Thanks to Rob Meijerink from the Netherlands for providing the fix in a pull request
* Bugfix: Removed depreciation warning when converting, happening in PHP 8.2. Thanks to Sophie B for reporting and Rob Meijerink from the Netherlands for providing the fix in a pull request
* Bugfix: One of the Mime fallback methods did not work. Thanks to gerasart from Ukraine for providing the fix in a pull request

0.25.6

(released 15 April 2023)
* Bugfix: A bug in another plugin can cause delete file hook to be called with an empty string, which WebP Express was not prepared for (fatal exception). Thanks to Colin Frick from Liechtenstein for providing the fix in a pull request on github
* Bugfix: Bug when testing imagick converter from settings page (only PHP 8). Thanks to Sisir from Bangladesh for reporting and providing the fix in a pull request

0.25.5

(released 23 May 2022)
* When using the “Prevent using webps larger than original” with Alter HTML (picture tags) on images with srcset, those webps that where larger than the originals was picked out from the srcset for the webp. This could lead to bad quality images. In the fix, the image will only have a webp source alternative when ALL the webps are smaller than their originals (when the “prevent…” option is set).
* Bugfix: In rare cases, WebP Express could fail detecting mime type

0.25.4

(released 6 May 2022)
* AlterHTML (when using picture tags): Fixed charset problems for special characters in alt and title attributes. The bug was introduced in 0.25.2. Thanks to Cruglk for first pointing this out.

0.25.3

(released 4 May 2022)
* AlterHTML: Fixed BIG BUG introduced in 0.25.2 (the webp urls was wrong when using picture tags). So sorry! Thankfully, I was quickly made aware of this and quickly patched it.

0.25.2

(released 4 May 2022)
* AlterHTML did not skip existing picture tags when they contained newlines, resulting in picture tags inside picture tags, which is invalid markup. Thanks to Jonas for being very helpful in solving this.

0.25.1

(released 7 dec 2021)
* An innocent text file triggered Windows Defender. It has been removed. Thanks to Javad Naroogheh from Iran for notifying

0.25.0

(released 7 dec 2021, on my daughters 10 year birthday!)
* No exec()? – We don’t give up easily, but now emulates it if possible, using proc_open(), passthru() or other alternatives. The result is that the cwebp converter now is available on more systems. Quality detection of jpegs also works on more systems now. The fallback feature with the emulations is btw implemented in a new library, exec-with-fallback
* Bugfix: Our WP CLI command “webp-express” has a quality option, but it was not working

For older releases, check out changelog.txt

1 Aug 2018Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)