The A List Apart Blog Presents:

Testing Responsive Images

Article Continues Below

At long last, the native picture element isn’t just coming: it’s here. The picture element has landed in Canary—Google’s “beta” channel for upcoming Chrome releases—and we can try it out for ourselves right now. Firefox isn’t far behind, and WebKit work is officially underway.

We got the picture element this far, and now that we’re in the final stages we have another opportunity to help things along: testing and filing bugs. Yoav Weiss is hard at work, testing and patching as much as possible before this ships in Chrome stable—but the more eyes we have on this, the better.

Ready to get started?

  1. Download Chrome Canary
  2. Copy and paste the following into Canary’s address bar:
    chrome://flags/#enable-experimental-web-platform-features
  3. Click “enable”

The page at chrome://flags allows you to tinker with the browser’s internals a bit, enabling and disabling features that might not quite be ready for prime time: the picture element is, for now, behind the “experimental web platform features” option—including sizes and srcset. Don’t worry: changing this option in Canary won’t have any effect on your regular Chrome app.

Kicking the tires

And now—finally—we can try out the native picture element for ourselves. The Picturefill demos are a great place to get started, since Picturefill only takes over in the event that the element isn’t natively supported. One thing to note is that this early version of picture doesn’t re-evaluate when the viewport resizes—at least until the next major patch lands—so you’ll need to reload the page to see things change, for now.

Experiment with the new markup for yourself, either by forking the Picturefill repo and making changes to the existing demos, or by writing your own from scratch. If something seems wrong, file an issue on Yoav’s fork of the Google Blink code, or join us in the RICG IRC channel to discuss what you’re seeing—or just to share your test cases with us, so we can test the Firefox and Safari implementations against them when the time comes.

We couldn’t have made it this far without the hard work of the design and development community—and the more testing we do now, the better responsive images will be for it.

11 Reader Comments

  1. Wonderful….. I followed the above three steps and it shows me the best result that is really important if we are going to develop a fully responsive website.

  2. Really nice article…. Quite knowledgeable … Thanks for sharing information. I have become habitual to read your knowledgeable articles. Keep it up.

Got something to say?

We have turned off comments, but you can see what folks had to say before we did so.

More from ALA

Design for Amiability: Lessons from Vienna

Computing was born in a Viennese café. Between 1928 and 1934, while Hitler plotted and Europe crumbled, a motley crew of mathematicians, philosophers, architects, and economists gathered weekly to puzzle out the limits of reason—and invented Computer Science in the process. What made their collaboration possible wasn't just brilliance (though they had plenty). It was amiability: the careful design of a social space where difficult people could disagree without destroying each other. Longtime A List Apart contributing author Mark Bernstein mines this forgotten history for lessons that might just save today's embattled web from its worst impulses. Spoiler: it involves better coffee service and the looming threat of public humiliation.

From Beta to Bedrock: Build Products that Stick.

Building towards bedrock means sacrificing some short-term growth potential in favour of long-term stability. But the payoff is worth it: products built with a focus on bedrock will outlast and outperform their competitors, and deliver sustained value to users over time. Liam Nugent shows us how.

User Research Is Storytelling

At a time when budgets for user experience research seem to have reached an all-time low, how do we get stakeholders and executives alike invested in this crucial discipline? Gerry Duffy walks us through how the research we conduct is much like telling a compelling story, complete with a three-act narrative structure, character development, and conflict resolution—with a happy ending for researchers and stakeholders alike.

Discover more from A List Apart

Subscribe now to keep reading and get access to the full archive.

Continue reading