Hacker News new | ask | show | jobs
by acdha 4679 days ago
Polyfilling is an issue, although a manageable one if you're willing to use noscript:

  <picture>
    <noscript><img src="old-browser.jpg"></noscript>
  </picture>
(<noscript> should keep browsers from loading the image tag, so you could do things like have JavaScript evaluate your image candidates and generate an img accordingly)

I'd prefer an extra tag during the migration stage to make the long-term goal more readable, particularly if we start wanting to extend it to do things like offer different image formats rather than just resolutions.

1 comments

In the proposal I saw, browsers that supported <picture> would ignore <img> tags inside a <picture>, meaning you could use it as a fallback for legacy browsers.