• 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you tried and tested both solutions?

    Thread Starter kentannenbaum

    (@kentannenbaum)

    Hey Mike, no time because of the holiday…can’t get to my computer yet but will get it done ASAP. Believe me, I want to know. Thanks.

    Thread Starter kentannenbaum

    (@kentannenbaum)

    One of the issues, if not THE issue is that I’ve been running this iMac at a different resolution than the default, which is 1920×1080. I like a slightly larger feel for my retouching work so it’s been at 1600×900 for a long time and it’s made some of the images seem soft in looking at the site. FYI, I did upload the leading image on my homepage using both sets of code loaded into the child theme css and it made no difference. As mentioned, the goal was to eliminate the size attributes and see what would happen to sharpness. Even if one of the two solutions worked I wouldn’t know because of my apparent bone-head move of using a resolution that brings the images up above 100% probably causing the softness. Sorry for the inconvenience of looking into a problem that’s of my own doing.

    David_G

    (@questas_admin)

    Your images are showing crystal clear on my PC. Just thought you might like to know, based on your last post. Realy nice pix by the way.

    Thread Starter kentannenbaum

    (@kentannenbaum)

    That is seriously gratifying on both counts…thanks very much.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘need code to improve jpeg quality’ is closed to new replies.