Filter to Exclude Images from WebP Conversion
-
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)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Filter to Exclude Images from WebP Conversion’ is closed to new replies.