using <picture> tag with Internet Explorer 11

Lucky500 picture Lucky500 · Aug 21, 2018 · Viewed 15k times · Source

Have been searching the internet for a while and no solution.

I am trying to use slick carousel with the new picture tag, works great in every browser but IE 11. does anyone know about a workaround/polyfill for IE 11?

Answer

zucc0nit picture zucc0nit · Aug 22, 2018

The <picture> tag is part of HTML5 but on the documentation, the fallback is <img> which will even work on old browsers.

<picture>
   <source media="(min-width: 64em)" src="high-res.jpg">
   <source media="(min-width: 37.5em)" src="med-res.jpg">
   <source src="low-res.jpg">
   <img src="fallback.jpg" alt="This picture loads on non-supporting browsers.">
   <p>Accessible text.</p>
</picture>