Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Don't use this :)
Branch: master
Pull request Compare This branch is 3 commits ahead, 733 commits behind scottjehl:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


A crude polyfill for proposed behavior of the picture element, which does not yet exist, but should. :)

  • Author: Scott Jehl (c) 2012
  • License: MIT/GPLv2
  • Notes: For active discussion of the picture element, see While this code does work, it is intended to be used only for example purposes until either:

    A) A W3C Candidate Recommendation for is released

    B) A major browser implements

Demo URL:

Note: The demo only polyfills picture support for browsers that support CSS3 media queries, but it includes the matchMedia polyfill for media-query-supporting browsers that don't have matchMedia.

Enhanced 02/03/2012 -

  • Prevent default img src download Jake Archibald stylee
  • Allow and respect height/width attributes to help with layout
  • Lazy load fist image only when in or above visible area
Something went wrong with that request. Please try again.