WordPress at a glance
filter is not described

jpeg_quality filter-hook . WP 2.5.0

Filters the JPEG compression quality for backward-compatibility.

Applies only during initial editor instantiation, or when set_quality() is run manually without the $quality argument.

set_quality() has priority over the filter.

The filter is evaluated under two contexts: 'image_resize', and 'edit_image', (when a JPEG image is saved to file).


add_filter( 'jpeg_quality', 'filter_function_name_5485', 10, 2 );
function filter_function_name_5485( $quality, $context ){
	// filter...

	return $quality;
Quality level between 0 (low) and 100 (high) of the JPEG.
Context of the filter.

Where the hook is called

wp-includes/class-wp-image-editor.php 255
$quality = apply_filters( 'jpeg_quality', $quality, 'image_resize' );
wp-admin/includes/image-edit.php 375
return imagejpeg( $image, $filename, apply_filters( 'jpeg_quality', 90, 'edit_image' ) );

Where the hook is used (in WP core)

Использование не найдено.