Hi @luislu,
Thanks for reaching out. You can use the filter as below:
function set_webp_quality( $quality, $mime_type ) {
if ( 'image/webp' === $mime_type ) {
return 90;
}
return $quality;
}
add_filter( 'wp_editor_set_quality', 'set_webp_quality', 10, 2 );
With regards your default quality query this is set as 82. You’ll find more details on this below:
https://github.com/WordPress/performance/issues/563
One other thing to note is that if you have your WebP image quality set very high, and the WebP file size is greater than the JPEG version size, there won’t be a WebP version of the image created. In other words, there is no file size advantage to using WebP in such cases.
Hopefully the above is of use. Let me know if you have any further questions on this.