Ideal-Image-Slider-JS
Ideal-Image-Slider-JS copied to clipboard
srcset support
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.
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!
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">
🤔 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.
+1 for this as a feature, would be great.