Allow changing "threshold" for lazy loading (images)
I figured out that currently, the IntersectionObserver's threshold, which is used for lazy loading, is set to 300px by default. I wanted to increase this to something that matches other lazy loading libraries and actual Chrome settings and I found that it might be possible to override the setting by defining a window.lazyLoadOptions object.
However, this only works for the autoInitialize function, which is looking for elements with the default .lazy selector. But when setting up LazyLoader for images with the [data-lazyloaded] attribute here, the window.lazyLoadOptions is ignored, so there is no way to override the 300px threshold, which - in my case - sometimes a little too hard and small.
Is it possible to modify lazyload.init.js so that it also respects an existing window.lazyLoadOptions?
Yes definitely we can do that. @timotei-litespeed can you give a hand?
@frzsombor I looked into and I have a code ready. We are making some code changes and I am putting this on pause for next period