You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, love the library! I was wondering whether there might be a possible solution to lazy load the background images defined in CSS by using a default image? So what I mean by that is that we would define a default image in the template, and then when the lazy load gets fired instead of switching out the background-image with inline CSS, could we just remove the background-image defining the default and let the site's CSS take over? This would allow for much easier handling of responsive background images, and would remove a lot of unnecessary code from our javascript.
So the defaultImage would be shown until time for the lazy loading to take place, at which point it would simply be removed and the CSS would take over.
The text was updated successfully, but these errors were encountered:
Hi, love the library! I was wondering whether there might be a possible solution to lazy load the background images defined in CSS by using a default image? So what I mean by that is that we would define a default image in the template, and then when the lazy load gets fired instead of switching out the background-image with inline CSS, could we just remove the background-image defining the default and let the site's CSS take over? This would allow for much easier handling of responsive background images, and would remove a lot of unnecessary code from our javascript.
My proposal would be that we could simply do:
So the defaultImage would be shown until time for the lazy loading to take place, at which point it would simply be removed and the CSS would take over.
The text was updated successfully, but these errors were encountered: