Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use scrollMargin for lazy load intersection observer
Currently the lazy load intersection observer is set up using a rootMargin. This does not work well for pages that use images in CSS scrollers, like carousels, causing the images to load too late, when they become visible and the intersection with the root is detected. To work around this issue some developers are choosing to not use lazy loading, thus increasing the overall bandwidth usage for their sites. Using scrollMargin for the lazy load intersection observer will allow lazy loading images to load when they are near the viewport as expected.
- Loading branch information