I had upgrade Simple Lazyload plugin to be able to custmize lazy load scope.
Two features has been added to this plugin:
* upgrade: add ‘simple_lazyload_skip_lazyload’ filter, use this you can customize lazy load scope.
* upgrade: add lazy load switch for images, when an image contains ‘skip_lazyload’ class or attribute, it will no longer be lazy loaded.
For example, if you want homepage don’t use lazy load, you can add a add_filter in functions.php of current theme. Here is the code:
add_filter(‘simple_lazyload_skip_lazyload’, ‘simple_lazyload_skip_lazyload_func’);
function simple_lazyload_skip_lazyload_func($skip_lazyload) {
if (is_home()) {
return true;
}
}
If you want some specified images don’t use load load, you can add ‘skip_lazyload’ class or attribute to them. After added, images’ source code may like this:
<img src=”https://www.xxx.com/images/1.jpg” skip_lazyload/>
<img src=”https://www.xxx.com/images/2.jpg” skip_lazyload/>
<img src=”https://www.xxx.com/images/3.jpg” skip_lazyload/>