holder
holder copied to clipboard
Using holder with <picture> element doesn't work ?
Hi, not sure if it me doing something wrong or trying to do something that's not possible.
Using holder with just <img .. >
works great. But if i want to do something like below to select the img based on orientation, or use webp with jpeg has the fallback then holder.js doesn't seem to work. Is it possible to have holder.js working in these situations ?
<picture>
<source media="orientation:landscape" srcset="horizontal-image.jpg" />
<source media="orientation:portrait" srcset="vertical-image.jpg" />
<img src="image.jpg" alt="an image" />
</picture>
many thanks
could you post a jsfiddle that shows Holder not working?
i don't think there's built-in support, but it's definitely something that should work.
will look at this, maybe worth putting it into v3 along with other general improvements. this may change the general processing logic too much to be a cheap addition.