WordPress at Your Fingertips
filter is not described

wp_editor_set_quality filter-hook . WP 3.5.0

Filters the default image compression quality setting.

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.


add_filter( 'wp_editor_set_quality', 'filter_function_name_927', 10, 2 );
function filter_function_name_927( $quality, $mime_type ){
	// filter...

	return $quality;
Quality level between 1 (low) and 100 (high).
Image mime type.


Since 3.5.0 Introduced.

Where the hook is called

wp-includes/class-wp-image-editor.php 241
$quality = apply_filters( 'wp_editor_set_quality', $this->default_quality, $this->mime_type );

Where in WP core the hook is used WordPress

Usage not found.