The following function disables image compression:

add_filter( 'wp_editor_set_quality', function( $arg ) {
    return 100;

Does this cover WebP images as well as JPEGs?

1 Answer 1


It does cover webp as well. From several google pages the default compression was 86. You could also test to confirm by uploading a few with different settings in your functions. This issue on Github shows they changed the default quality to 82. https://github.com/WordPress/performance/issues/563.

We can see that webp images use the same quality value as jpeg images here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.