Defer lazy loading of images until the relevant images begins to enter the viewport
I have small bit Javascript that detects if an image has been loaded by the browser, then adds a class of .loaded
to its parent.
Off-canvas img’s not displaying when they entire the viewport with lazy loading
I’m having a few issues with images displaying that begin life off the screen but scroll into view automatically with looping carousels. The images use loading="lazy"
and a small bit of Javascript.