On this page
apply_filters( 'wp_editor_set_quality', int $quality, string $mime_type )
Filters the default image compression quality setting.
Description
Applies only during initial editor instantiation, or when set_quality() is run manually without the $quality argument.
The WP_Image_Editor::set_quality() method has priority over the filter.
Parameters
$qualityint-
Quality level between 1 (low) and 100 (high).
$mime_typestring-
Image mime type.
Source
File: wp-includes/class-wp-image-editor.php. View all references
$quality = apply_filters( 'wp_editor_set_quality', $default_quality, $mime_type );
Related
Used By
| Used By | Description |
|---|---|
| WP_Image_Editor::set_quality() wp-includes/class-wp-image-editor.php | Sets Image Compression quality on a 1-100% scale. |
Changelog
| Version | Description |
|---|---|
| 3.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_editor_set_quality