webp-express icon indicating copy to clipboard operation
webp-express copied to clipboard

Convert FROM webp to jpeg/png

Open rosell-dk opened this issue 3 years ago • 2 comments

With Wordpress 5.8, it will become possible to upload webp, but it will not come with automatically conversion to jpeg / png for older browsers. We will probably see a growing need for doing that. It would be very nice if WebP Express supported that.

Such change is however quite heavy.

  1. The webp-convert would need to be extended to support converting the other direction and a strategy must be implemented for choosing between jpeg and png. Such strategy could simply be lossless -> PNG, lossy -> Jpeg. With lossy, we could also try converting both to png and jpeg, discarding the largest of these. Btw: The signature difference of webp lossy vs lossless can be found https://developers.google.com/speed/webp/docs/riff_container#simple_file_format_lossy
  2. Alter HTML should be extended (preferably both using picture syntax and simple replacement)
  3. Rewrite rules should be set up to redirect webp requests to jpeg on browsers that does not support webp

The feature was requested here

rosell-dk avatar Jul 08 '21 10:07 rosell-dk

I have the exact problem you predicted where a customer setup his publishing site and decided to only use webp image formats now they are stuck on one format and need to generate JPG images from the webp images.

tripledm avatar Sep 13 '21 09:09 tripledm

Exactly the problem I'm having with clients.

cvladan avatar Jun 15 '22 20:06 cvladan