Hello,
I have the asked the development team about this and we will update you shortly.
Thank you for your patience. Whether or not WebP images are returned depends on the HTML rather than a function. If your site is capable of redirections, then any request to a JPG/PNG will be redirected to a WebP. If not, then the HTML is modified to point to the WebP image.
If on some occasions WebP images are displayed but not on others, then it’s likely that not all images have been converted to this format, which can be caused by some of the images being compressed before the option to enable WebP was used.
Thank you very much for the information.
So if I understand correctly, the replacement of .jpg -> .webp is done at the .htaccess level?
It seems to me that the rule works well for elements, but not for links to jpg images or for images used as backgrounds of other elements.
I tried to demonstrate specific behavior here: https://knihovna-hranice.cz/wepb/
For direct links to images, processing the link via JavaScript, for example, into a lightbox, is possible, and the rewrite mode won’t catch it. It doesn’t necessarily have to be detrimental; displaying the original .jpg image can actually be useful.
On the other hand, it’s a pity for backgrounds; there, using a compressed image would be beneficial.
I use your plugin on all my websites, and I think resolving this “shortcoming” in some future update would make not only me happy.
Thank you in advance and greetings!