Filter to exclude images from lazy load

[ad_1]

Hi, I see your filter:

add_filter( 'sgo_lazy_load_exclude_images', 'exclude_images_from_lazy_load );
function exclude_images_from_lazy_load( $excluded_images ) {
    // Add the src url of the image that you want to exclude from using lazy load.
    $excluded_images[] = 'http://mydomain.com/wp-content/uploads/your-image.jpeg';

    return $excluded_images;
}

And my question is if “your-image.jpeg” will affect your webP version of that image, so if you serve the webP version of that .jpg, will this filter be applied? Or Do I need to also add another filter for the webP version?

And the same question for all the image sizes that WP creates, for example, “your-image-150×150.jpg” or “your-image-768×253.jpg”.

And Can I add several images to that code? Or Do I need to repeat the code for every image? If I can use the same for several images, Can you write the code for 2-3 images? Must they be separated by a comma or how? For example, Is this correct?:

$excluded_images[] = 'http://mydomain.com/wp-content/uploads/your-image.jpeg, ';

Regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer