-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add support similar to srcset to overcome resolution switching problem #27
Comments
Yes, you can use the <figure class="progressive">
<img class="progressive__img progressive--not-loaded" data-progressive="assets/images/infographic@2x.png" data-progressive-sm="assets/images/continuous-improvement.png" src="assets/images/continuous-improvement-lowly.png">
</figure> Ps, Make sure you set proper break point value so that the non-retina image loads on devices with width > 600 and < 1500. |
@thinker3197 It's not about the viewport width, it's about the device pixel ratio. With It uses extra high res version of the image at high DPI and normal res at normal DPI.
Retina displays can be on large screens so a viewport check is not appropriate. |
Agreed, my bad I didn't understood it first. At the moment progressively doesn't support a similar functionality as |
No worries. I'll have a go at a feature enhancement PR next week. |
|
I currently have this HTML to cater for retina devices:
<img src="assets/images/continuous-improvement.png" srcset="assets/images/continuous-improvement.png 1x, assets/images/infographic@2x.png 2x" alt="" />
Is there any way to achieve the same result with progressively?
The text was updated successfully, but these errors were encountered: