4 ms·
Ah right, thanks. I had been thinking that picture and srcset were competing.
by PStamatiou 13y ago
Ah right, thanks. I had been thinking that picture and srcset were competing.
- igrigorik 13y agoThey're complementary. <picture> uses subset of original srcset spec to meet the "resolution switching" use case - e.g. see Example 1 [1]. If you want to select an asset based on viewport width, then you'd either use "sizes" attribute on picture, or a combination of srcset + sources + sizes. [1] http://picture.responsiveimages.org/#examples http://picture.responsiveimages.org/#examples