Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using <picture> tag with Internet Explorer 11

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?

like image 206
Lucky500 Avatar asked Aug 21 '18 21:08

Lucky500


People also ask

Why is Internet Explorer not showing pictures?

In the Internet Options window, click the Advanced tab. In the Settings under Multimedia, make sure the Show Pictures checkbox is checked ✓. Click Apply, then OK. Close and reopen Internet Explorer.

How do you tag a picture in HTML?

Copy and paste your image URL into an IMG tag, add a SRC to it. Identify first where you'd like to place your image within the HTML and insert the image tag, <img>. Then take your uploaded image, copy the URL and place it within your img parameters prefaced by a src.

Does Safari support picture tag?

Safari 9 doesn't have support for <picture> . It only supports <img srcset> . If you need <picture> support for Safari, you probably want to add picturefill to your site.

Which tag is used for picture?

The <img> tag creates a holding space for the image to be inserted. It is an empty tag with two attributes and no closing tag. The <img> page may also take other attributes like style or width and height for specifying the size of the image to be displayed.


2 Answers

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>
like image 118
zucc0nit Avatar answered Sep 20 '22 09:09

zucc0nit


The standard <picture> polyfill is Picturefill. It should allow the element to work as expected in IE8+.

like image 21
Leland Avatar answered Sep 22 '22 09:09

Leland