Page 1 of 1

Image SrcSet widths - is this correct, as doesn't work

Posted: Mon Aug 21, 2017 1:25 pm
by simonmlewis

Code: Select all

<img srcset='/images/responsive_475.jpg 475w, 
/images/responsive_768.jpg 768w, 
/images/responsive_1024.jpg 1024w,
/images/responsive.jpg 1920w,
/images/responsive.jpg 2560w'
(max-width: 475px) 475px,
            (max-width: 768px) 768px,
            (max-width: 1024px) 1024px,
            (max-width: 1920px) 1920px,
            (max-width: 2560px) 2560px'

 src='/images/homepromo-responsive.jpg' alt='tag' />
On my iPhone 7, I am getting the 768 image, not the 475 image. I know because the 475 one is much taller than the 768 image.
I've seen it done without the max-width code. But even with that, it does't work.