I am trying to figure out a way to provide high resolution dpi images for iOS8, and also provide flexible image resources for browsers that support the w syntax. According to the W3C standard, it should be possible to mix both syntaxes in one srcset attribute:
<img alt="The Breakfast Combo" src="banner.jpeg" srcset="banner-HD.jpeg 2x, banner-phone.jpeg 100w, banner-phone-HD.jpeg 100w 2x">
(Source: http://drafts.htmlwg.org/srcset/w3c-srcset/ )
However, when I run this example in Chrome 38 (OS X, without high dpi) that supports the w syntax, in other cases the browser always loads the largest image (banner-HD.jpeg), regardless of the size of the viewport, When I add
banner.jpeg 1x
for srcset, Chrome uses this image, but still ignores 100x images.
In my case, I would like to specify a smaller version of the image, as well as 2x resources for both:
<img src="default.png" srcset="small.png 480w, small@2x.png 480w 2x, medium.png 1x, medium@2x.png 2x">
This is similar to working with 2x iOS8 devices that select medium@2x.png because they do not support the w syntax. However, Chrome still doesn't care and loads medium.png regardless of viewport size.
Am I doing something wrong here or is this a known issue in implementing xrcset in Chrome?