Skip to main content

Responsive images proposed by WHATWG

A post by Mathew Marquis on the W3C Responsive Images Community Group has outlined proposals to deal with responsive images on the web.

At present, most solutions require workarounds and scripts, and many ‘force’ users to download more data than should be necessary. However, with high-res displays likely to become commonplace over the next year and responsive web design increasingly popular among web designers, it’s clear standards need to keep up.

Marquis explained one proposal surrounds the existing 'img' element, adding syntax to deal with multiple sources by way of a new 'set' attribute. However, the community group proposes utilising the 'picture' element, with multiple 'source' elements to define images to be used for viewports of specific sizes and/or devices with specific pixel ratios.

Marquis said that the existing proposal wasn’t as developer-friendly as the one based around 'picture', and he asked for developer opinions, providing various means of making yourself heard at the end of the article.

The proposals have already sparked debate. Although developers appear broadly positive regarding the picture proposal, Adaptive Images creator Matt Wilcox argued 'set' was awful, with unclear syntax, an over-reliance on image dimensions and pixel density multipliers, and use of pixels “in an era where pixels are dying”. However, he also disliked the repetition within 'picture'. Others noted that the 'picture' syntax is at least consistent with that used in the 'video' element, although the term ‘picture’ isn’t as semantic as it should be.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of six full-time members of staff: Editor Kerrie Hughes, Deputy Editor Rosie Hilder, Deals Editor Beren Neale, Senior News Editor Daniel Piper, Digital Arts and Design Editor Ian Dean, and Staff Writer Amelia Bamsey, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.