-
Notifications
You must be signed in to change notification settings - Fork 616
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
Support for 2x & 3x through data attributes #283
Comments
There doesn't appear to be way to do this that I have found either (if you define the attribute twice then only one is used of course) - however if you set a 3x image as the path, then it will also be used for 2x retina. I'm not entirely sure if there are any issues with this as I don't have a 3x retina device to test on, but I can say that all looks ok in 2x and 3x retina in responsive design mode of a standard desktop browser. |
I needed something like that too and saw that this issue was opened since August 14. I coded a little solution for one of my project on a fork: |
You can use the browser devicePixelRatio for judgment |
I didn't know if there was a better place to ask questions.
Is there a way to manually specifying both 2x & 3x versions through data attributes? The following example given in the README seems to only support one. I used rails with digested assets and would prefer not to generate non-digested assets, but would also like to support 2x & 3x. Thanks!
The text was updated successfully, but these errors were encountered: