Ideal-Image-Slider-JS icon indicating copy to clipboard operation
Ideal-Image-Slider-JS copied to clipboard

srcset support

Open tyssen opened this issue 9 years ago • 4 comments

Hi, would it be possible to have srcset support added for Ideal Image Slider?

Currently I'm setting the src as the smallest image and then using Picturefill to replace that with larger sizes set in the srcset attribute, but the slider script only uses the value set in the src which means the images get stretched on larger screens.

tyssen avatar Jun 25 '15 06:06 tyssen

if you check out the docs - particularly the "Getting Started" bit you can see that srcset can be specified by data-src-2x=. It works a dream!

wknowles avatar Apr 17 '16 09:04 wknowles

That only covers 2x images though. Support seems lacking for markup like:

<img src="small.jpg"
 srcset="large.jpg 1024w,
         medium.jpg 640w,
         small.jpg 320w"
 sizes="(min-width: 36em) 33.3vw, 100vw">

tyssen avatar Apr 17 '16 10:04 tyssen

🤔 humm I hadn't thought about that! It should be possible - I would like this feature too. My JS is not good but I will have a look at it.

wknowles avatar Apr 18 '16 17:04 wknowles

+1 for this as a feature, would be great.

rickibarnes avatar May 04 '16 02:05 rickibarnes