need code to improve jpeg quality
-
What’s going on is a softness to SOME of my photos, all sized properly before upload at 600px x 72dpi. What’s been recommended in the forum are a couple of code solutions that remove the size attributes before upload which some coders think might solve the problem of softness. If anyone has success with this I’d love to hear it. Here are two suggestions I came across:
FIRST SOLUTION:
dd_filter( ‘post_thumbnail_html’, ‘remove_width_attribute’, 10 );
add_filter( ‘image_send_to_editor’, ‘remove_width_attribute’, 10 );
function remove_width_attribute( $html ) {
$html = preg_replace( ‘/(width|height)=”\d*”\s/’, “”, $html );
return $html;
}
SECOND SOLUTION:
function gpp_jpeg_quality_callback($arg)
{
return (int)100;
}
add_filter(‘jpeg_quality’, ‘gpp_jpeg_quality_callback’);
HERE’S MY SITE: http://kentannenbaum.com
The topic ‘need code to improve jpeg quality’ is closed to new replies.