Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using holder with <picture> element doesn't work ? #195

Open
thechile opened this issue Aug 13, 2016 · 4 comments
Open

Using holder with <picture> element doesn't work ? #195

thechile opened this issue Aug 13, 2016 · 4 comments

Comments

@thechile
Copy link

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

@imsky
Copy link
Owner

imsky commented Aug 13, 2016

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.

@samtrion
Copy link

samtrion commented Sep 2, 2016

Same problem for me...

Fiddle

@samtrion
Copy link

samtrion commented Sep 2, 2016

If i add text on each srcset, i get the default value... strange :/

Fiddle

@imsky
Copy link
Owner

imsky commented Sep 6, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants