Add a filter to the jpeg_quality to allow for it to be modified. Fixes #6289.
git-svn-id: https://develop.svn.wordpress.org/trunk@7444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
90571b05c1
commit
0c47f0d9d9
@ -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
Block a user