I am using angular 6 and i notice that .webp images are not displaying and no problem for jpg,png . How to display webp image in angular 6 ?
It is working in google chrome and not working in mozilla firefox
I am using angular 6 and i notice that .webp images are not displaying and no problem for jpg,png . How to display webp image in angular 6 ?
It is working in google chrome and not working in mozilla firefox
<picture>
<source srcset="test1.webp" type="image/webp">
<source srcset="test1.jpg" type="image/jpg">
<img src="test1.jpg" alt="test">
</picture>
Use picture tag to specify a set of fallbacks for less capable browsers. Browsers that don’t support will just display whatever source is specified in the img tag.
The img tag with the source attribute worked for me. Everything else can be read in the link below.
<img src="img/myAwesomeWebPImage.webp" alt="WebP rules.">