[whatwg] <picture>, `img set`, and polyfills

Mathew Marquis mat at matmarquis.com
Mon May 14 16:17:05 PDT 2012

It’s worth noting that a practical polyfill may not be possible when using `img set`, for reasons detailed at length elsewhere:

Long story short: attempting to write a polyfill for `img set` leaves us in the exact situation we were in while trying to solve the issue of responsive images strictly on the front-end. We would be saddling users with a redundant download—first for the original src, then for the appropriately-sized source if needed. 

Where the new element would be all but ignored by existing browsers, efficient polyfills become possible. In fact, two `picture` polyfills exist today: http://wiki.whatwg.org/wiki/Adaptive_images#Functional_Polyfills

Mat Marquis

More information about the whatwg mailing list