I am trying to use the <picture>
and <source>
elements to provide some responsive images for my site.
My problem is that only the default image shows. I have tried reloading the page using different window sizes and I have also loaded PictureFill.
What am I doing wrong?
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source media="(max-width: 479px)" srcset="smallImage.jpg" />
<source media="(max-width: 640px)" srcset="mediumImage.jpg" />
<source media="(max-width: 767px)" srcset="largeImage.jpg" />
<!--[if IE 9]></video><![endif]-->
<img class="rsImg" src="xLargeImg.jpg" alt="MyDefaultImg" />
</picture>
NB: I have been using Chrome while getting this issue