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

data-srcset - responsive image doesn't work #151

Closed
virginiarcruz opened this issue Dec 11, 2018 · 1 comment
Closed

data-srcset - responsive image doesn't work #151

virginiarcruz opened this issue Dec 11, 2018 · 1 comment
Labels

Comments

@virginiarcruz
Copy link

I need to change the images per each breakpoint.
For example, for
max-width: 767px: image-mobile.jpg
max-width: 1024px: image-desktop.jpg

I'm trying this way, but doesn't work for me:

<div class="image-wrapper">
  <img class="lozad"
  data-src="https://picsum.photos/1600/900?image=3"
  data-srcset="https://picsum.photos/767/800?image=3 767w,
  https://picsum.photos/1024/900?image=3 1024w">
</div>

Should I, add another config to work?

@TokyoWeb
Copy link

I had the same issue understanding or making work the data-srcset.

See my issue #134 then code working fine.

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

No branches or pull requests

3 participants