I thought about starting to use webp images and got a site currently that uses couchcms and thought would be good that when the admin uploads a image, it's converted to webp. I was going to use the code from below as already started to use lazyload from https://github.com/aFarkas/lazysizes

Code: Select all
<picture>
  <source type="image/webp" data-srcset="flower.webp">
  <source type="image/jpeg" data-srcset="flower.jpg">
  <img data-src="flower.jpg" class="lazyload" alt="">
</picture>


Has anyone done similar or got a snippet of code to use please?