rosell-dk / webp-convert

Convert jpeg/png to webp with PHP (if at all possible)
MIT License
578 stars 102 forks source link

WebP not rendering as webp format #270

Closed mofizul21 closed 3 years ago

mofizul21 commented 3 years ago

Hi,

Thanks a lot for creating the plugin. I have an issue.

I've used this code <?php echo get_the_post_thumbnail(); ?> in my post loop for displaying image. I see webp images are creating in the folder, but not rendering. It's rendering as jpg format, but I want to render as webp. If you inspect here the screenshot on the website, you can see it.

Why it's happening? Or how I can solve it?

Regards,

rosell-dk commented 3 years ago

Hi,

Sorry for not replying earlier. Actually, your question is regarding WebP Express, and should have been posted in that issue queue.

The HTML is not necessarily altered - only if you enable the Alter HTML option. Otherwise, apache rewrite rules makes sure to redirect the image request for the jpeg to the converted webp.