[whatwg] <picture> / <img srcset> not needed

Aldrik Dunbar aldrik at gmail.com
Tue May 15 18:23:21 PDT 2012


Hi there,

Adding a new *presentational* attribute/element for adaptive/responsive
images makes no sense and is not required. We already have a flexible
image format that can accomplish this — SVG, e.g.:


<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 1135">
	<desc>A painting by Edvard Munch, commonly known as "the scream".</desc>
	<style type="text/css" ><![CDATA[
		svg { background-size: 100% 100%; }
		@media (min-width:477px) {
			svg { background-image: url("https://upload.wikimedia.org/wikipedia/en/f/f4/The_Scream.jpg"); }
		}
		@media (max-width:476px) {
			svg { background-image: url("https://upload.wikimedia.org/wikipedia/en/thumb/f/f4/The_Scream.jpg/476px-The_Scream.jpg"); }
		}
	]]></style>
</svg>


Regards,
Aldrik Dunbar.


More information about the whatwg mailing list