Skip to content

Instantly share code, notes, and snippets.

@ike
Created November 28, 2011 15:30
Show Gist options
  • Save ike/1400780 to your computer and use it in GitHub Desktop.
Save ike/1400780 to your computer and use it in GitHub Desktop.
The New Img Tag
<img src="large-default-file.jpg">
<source src="smaller.jpg" media="max-width:600px">
<source src="tiny.jpg" media="max-width:320px">
</img>
@ejsiddiqui
Copy link

Hi Issac,
Although your solution is good for future but not working as the browser test statistics suggest.there is a problem.

Browsers consider it as following "" i.e. tag without a closing tag. And they are simply ignoring proceeding tag. All of the cases they are loading "large-default-file.jpg" no matter what your resolution or device is.

Yes, it would be great if this solution is adopted by W3C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment