I am building a mobile app using Ionic Angular framework and want to support webp images as primary images and if it is not supported I want the fallback image to be displayed.
It works with img
<picture>
<source srcset="assets/images/hello.webp" type="image/webp" />
<img src="assets/images/hello.png" alt="Hello image" />
</picture>
But it does not work with ion-img. It always shows the fallback png image here.
<picture>
<source srcset="assets/images/hello.webp" type="image/webp" />
<ion-img src="assets/images/hello.png" alt="Hello image"></ion-img>
</picture>