-
-
Notifications
You must be signed in to change notification settings - Fork 41
Make more useful for using different images on varying screen widths #2
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
base: master
Are you sure you want to change the base?
Conversation
The idea is that the default image (the one in the
and now with Responsively Lazy we make it lazy loaded and responsive on modern browsers by specifying smaller versions. The result is:
That's the big difference with other lazy loading implementations. Other libraries make you break your HTML by removing the |
@ivopetkov That idea with highest resolution as src is not good if you are doing mobile first |
@freezy-sk there is a "hack" that can be used in this case. Here is an example where the max image version width is 600px and you want the default to be 400px:
The |
@ivopetkov nice hack :) |
@freezy-sk sounds awesome :) Expect the update in an hour. |
👍 |
@Kiernan809 can you please give us more information about your last change ( |
Apologies for delay! This may be a non-use case: Somebody rotates their screen, loads new image, sets new padding-bottom etc. Rotates back, original padding-bottom, not original image. No longer fits. The old image is already cached; we know that it was designed for this screen size. It seems reasonable that we should use it. |
Rather than using the same image of different sizes, this allows the changing of image to match the screen size. eg. perhaps you want to change the aspect ratio of this image on a mobile vs a desktop.
Now we serve images on a min-width basis to match more common css media queries and provide a clearer path for doing so.