-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Feature Description
In #7 and the related Trac ticket (https://core.trac.wordpress.org/ticket/54356) we have been researching the best default quality settings for WebP images. While results aren't conclusive, I propose testing a quality of 82 in ther plugin to gather additional (subjective) feedback.
Current Status
Currently, when uploading WebP images or using the image_editor_output_format
filter to output WebP images, or using the Performance Lab plugin to output WebPs, the default quality set for WebP images is 86 (compared to the default quality setting used for JPEG of 82). The 86 quality setting was chosen to try to achieve the same visual quality for WebP images (compared to JPEGs).
Desired Outcome
Users get the smallest possible images without any noticeable degradation in quality. WebP was designed to meet this need: the quality setting is designed to match JPEG, providing a similar quality with a (much) smaller file size.
Challenges in 6.0
The filter used to control the default quality setting wp_editor_set_quality
had a bug until WordPress 6.1 that resulted in the incorrect mime type being passed to the filter. Because of this, setting quality by mime type doesn't work correctly until 6.1. However, we can use the filter to always return/set quality to 82 for all mime types.
Proposed solution
I propose setting the default quality for WebP images to 82. For versions before 6.1, we should set all mime types to 82, for 6.1+ we can base the quality on mime type and return 82 for WebP