Fully responsive images coming to Microsoft Edge

The Microsoft Edge team just announced support for the srcset attribute of the img element in Windows 10 and Microsoft Edge.

The srcset is an attribute on the img element that allows you to declare a set of images and their scale factor (pixel density descriptor). This allows browsers to select the best image for the device currently in use.

Here’s an example of an image with various versions defined in its srcset that will be loaded based on the device size.

<img src="fallback.jpg" srcset="lowres.jpg 1x, mediumres.jpg 1.5x, highres.jpg 2x" />