Add a filter to the jpeg_quality to allow for it to be modified. Fixes #6289.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c69821c5e0
commit
0c733599d4
|
@ -223,7 +223,7 @@ function image_resize( $file, $max_w, $max_h, $crop=false, $suffix=null, $dest_p
|
|||
else {
|
||||
// all other formats are converted to jpg
|
||||
$destfilename = "{$dir}/{$name}-{$suffix}.jpg";
|
||||
if (!imagejpeg( $newimage, $destfilename, $jpeg_quality ) )
|
||||
if (!imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality ) ) )
|
||||
return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue