I am using Galleria image gallery viewer. I need to use webp for browsers that support webp otherwise fallback to jpeg. This is the code for images:

<div class="galleria"  >



            <picture>
  <source srcset="images/garden.webp" type="image/webp" data-title="Garden Example" data-description="great garden">
  <source srcset="images/garden.jpg" type="image/jpeg"> 
  <img src="images/garden.jpg" data-title="Garden Example" data-description="great garden">
</picture>


  <picture>
  <source srcset="images/garden2.webp" type="image/webp" data-title="Garden Example" data-description="great garden 2">
  <source srcset="images/garden2.jpg" type="image/jpeg"> 
  <img src="images/garden2.jpg" data-title="Garden 2 Example" data-description="great garden 2">
</picture>


</div>

Chrome browser support webp but galleria ignores webp and uses jpg image. How can I make above work with galleria?

0 Answers