Closed alihs closed 3 years ago
Hello @alihs We are using the following library for the LazyLoad: https://github.com/verlok/vanilla-lazyload
You can check the available JS options there.
You can also use this filter to change the JS file for your own, prepared one: https://github.com/wp-media/wp-rocket/blob/b1374b37cefcd13ff4bcbe853dc8782d557d9c4b/inc/Dependencies/RocketLazyload/Assets.php#L182
I'd like to hook into WPR tiggers like readystatechange / rocket-query-load. I am building a medium like approach to images where initially a 1x1 image is loaded and then we get the full image loaded later on.
Also any hooks that once an image is loaded/lazyloaded i run some vanillajs