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 instead of srcset #60

Closed
meneerprins opened this issue Aug 27, 2018 · 5 comments
Closed

data-srcset instead of srcset #60

meneerprins opened this issue Aug 27, 2018 · 5 comments

Comments

@meneerprins
Copy link

Would it be possible to generate data-src & data-srcset etc. instead of the normal attributes? So it's easier to make it compatible with lazyloading libraries.

@octave
Copy link

octave commented Sep 18, 2018

👍

Yes like stated in this blog post: https://blog.imgix.com/2016/05/02/imgix-lazysizes

@piya23300
Copy link

I need it too.

I use React lib https://github.com/imgix/react-imgix#lazy-loading
There is

attributeConfig={{
    src: "data-src",
    srcSet: "data-srcset",
    sizes: "data-sizes"
  }}

I think Rails lib should have it too.

@sherwinski
Copy link
Contributor

Hey all,

We definitely agree that this gem should support lazy-loading! Unfortunately, we won't have the resources to revisit this until further down the road. For anyone searching for a solution in the meantime, I would encourage you to check out native lazy-loading with loading="lazy".

@lunks
Copy link
Contributor

lunks commented Nov 6, 2020

Support has been added on #108

@sherwinski
Copy link
Contributor

Resolved in #108

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

No branches or pull requests

5 participants