Re: Support for webp images
Reply #4 –
Finally looking at this and here is what I'm thinking (and actually have) doing
1) Added a check in the ACP for if you have WebP capability either in GD or Imagick. This will trigger if you add webp as one of the allowed file types.
2) With a WebP enabled server, when you upload a WebP image and it will create the thumbnail just like any other image
I'm going to drop the ACP option of "Save thumbnails as PNG" and update the thumbnail functionality as follows:
1) If you have WebP enabled, all thumbnails will be saved as WebP images. The WebP thumbnail images are smaller in size than JPG or PNG and retain alpha/transparency. For the thumbs I am only using lossy compression, unlike the old "PNG only thumbs" which by definition were lossless. The reality is they look just as good but it will saves some space/bandwidth, and its a thumbnail.
2) If you do not have WebP, and the uploaded image is a PNG with some alpha/transparency, then it will create the thumbnail as PNG
3) All others to JPG
Still to do:
1) Avatars
2) How I want integrate WebP options into Image Attachment Resizing (now built into 2.0)