$dst_file = preg_replace( '/\\.[^\\.]+$/', '.jpg', $dst_file );
- if ( imagejpeg( $dst, $dst_file ) )
+ if ( imagejpeg( $dst, $dst_file, apply_filters( 'jpeg_quality', 90, 'wp_crop_image' ) ) )
return $dst_file;
else
return false;
$file = get_attached_file( $file );
if ( ! file_exists( $file ) )
- return sprintf(__("File '%s' doesn't exist?"), $file);
+ return sprintf(__('File “%s” doesn’t exist?'), $file);
if ( ! function_exists('imagecreatefromstring') )
return __('The GD image library is not installed.');
$image = imagecreatefromstring( file_get_contents( $file ) );
if ( !is_resource( $image ) )
- return sprintf(__("File '%s' is not an image."), $file);
+ return sprintf(__('File “%s” is not an image.'), $file);
return $image;
}