• Good Day,

    We need a filter to exclude JPEG and PNG images from being converted to WEBP (similar to the filter you provided to exclude images from lazy loading).

    Something like:


    add_filter( 'sgo_webp_exclude_images', 'exclude_images_from_webp_conversion' );
    function exclude_images_from_webp_conversion( $excluded_images ) {
    $excluded_images[] = 'https://mydomain.com/wp-content/uploads/image1.jpeg';
    $excluded_images[] = 'https://mydomain.com/wp-content/uploads/image2.jpeg';
    return $excluded_images;
    }


    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Delyan Delov

    (@delyandelov)

    Hi @generosus,

    Currently we do not have such filter available, so I have passed your suggestion to our developer. We will get back to you when we have an update on the matter.

    Plugin Support Gergana Petrova

    (@gpetrova)

    Hello @generosus ,

    As you know the plugin generates WebP copies of all images in the media library, so the result from excluding a file from this feature (with filter or direct plugin functionality) will essentially be the same as if the WebP copy of a specific file is simply deleted.

    With the above in mind, the plugin’s developers have reviewed your request and for the moment no such filter will be created.

    Best Regards
    Gergana Petrova

    Thread Starter Generosus

    (@generosus)

    Hi @gpetrova,

    Unfortunately, your philosophy or approach does not work well with your plugin.

    Specifically, when we deactivate or reinstall your plugin for various reasons, it regenerates the WebP images that need to be bypassed. Also, our images are scattered over numerous wp-content/upload folders, so it’s painstaking to perform what you suggested.

    A filter (added to our functions.php file) will take care of that.

    Take your time and kindly provide the requested filter. You’ve developed many at the request of your paying clients. We fall in that category.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter to Exclude Images from WebP Conversion’ is closed to new replies.