We have not really been making use of the WebP format on our sites, but feel like it's time to start taking advantage of this image format which has the potential to increase the performance of our sites. I'm looking for a little update on what the status of WebP support is for Backdrop CMS.
It's my understanding that Backdrop CMS currently supports uploading WebP images directly to image fields if the image field is configured properly.
I've been told that for Drupal 9 sites you can configure your site to allow site editors to upload jpg or png and the site will convert those images to WebP. Is this possible for Backdrop CMS yet?
Am I correct in assuming that this module is intended for that purpose?
Here are other forum topics about WebP images.
I've been getting answers to my questions in other channels. Here is what I've learned so far and I'm continuing to investigate.
It seems as if there is work happening in a few places to better support WebP in Backdrop CMS.
As far as I can tell, I'm correct in that the only support in Backdrop Core at the moment is the ability to configure image fields to support WebP as an option. However, this feature is somewhat hidden and there are open issues that will help site admins discover/understand this option.
Here is one issue: https://github.com/backdrop/backdrop-issues/issues/5760
There are two contributed modules (that I know of) that provide additional WebP support. I've yet to try either, but both have open issues and may need work. I'll report back, after I've had time to test these modules.
I think that Image Effects might be the option I'm looking for, once this open issue is resolved. If I understand correctly, this module will allow you to create image styles that convert images from one format to another.
there's also Image block (which additionally supports svg, BTW).
That's correct, it will provide the ability to convert other image types to WebP for improved page loading.
ImageWebP converts images to the WebP, but Backdrop, like Drupal 7, isn't able to handle that image type. Even the default image toolkit, which uses the GD extension, isn't able to handle that image type.
WebP images can be directly shown in a page. They cannot be passed to image styles, since those uses the image toolkit to alter the image.
Backdrop handles WebP images fine, as long as the underlying GD supports it.
You can verify the support on /admin/reports/status/php:
Search for "WebP Support". It depends on the PHP version and the way GD was compiled. On recent Linux versions it's usually supported.
May depend on your hosting.