Skip to:
Content
Pages
Categories
Search
Top
Bottom

Increase Avatar Quality – Looks Hazy?

  • Is there a setting to increase the cropping quality, when we go add an avatar. It takes us through the process or cropping the avatar, and making a smaller one also. Both look hazy. Is there a setting to increase the dithering or clarity somewhere. Not sure if this is using GD / ImageMagik etc?

Viewing 10 replies - 1 through 10 (of 10 total)
  • I don’t know if this would be something that Andy would be able to control since it is done through using the image tools available on the server. It really is determined by the quality of the original image that you are uploading isn’t it? Could be wrong, but that is my understanding…

    Not sure. I uploaded a lossless PNG, it doesnt get much better then that as a source file already sized at the proper dimensions.

    Guess no one knows how to increase the cropping resolution? You can see a quality loss for sure. In the past on other scripts I have been able to edit a variable that allowed you to set the quality of the image crop.

    Anyone know?

    That might be it. It might actually have a variable somewhere. Just not sure where it would be, but running around the avatar upload function there must be something about this. If I find it, I will report back.

    Trent

    Thank you very much Trent, this is pretty important to me.


    Jeff
    Participant

    @jeffca

    I’d like to bump the quality up a bit too for avatars.

    Any luck finding this rishel or Trent?

    OK, so this is a core WordPress setting. It’s in /wp-admin/includes/image.php – specifically, the call to imagejpeg on line 71. http://php.net/imagejpeg has an optional third argument $quality. It defaults to 75 (0 being worse, 100 being best). If urgent I suggest changing this file for the interim.

    Elsewhere in WordPresss, /wp-includes/media.php, we have this:

    If (!imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality ) ) )
    return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));

    I’ll put a ticket on the WordPress trac to see if we can get this filter added to the call in image.php.

    *EDIT*: this is a core WordPress file, not MU.

    WordPress has had a patch submitted for this imagejpeg() thing and it’s already been added into the source, so future releases (and therefore future releases of WPMU) should let us use our filter. Hurrah!

    Nice to see you found that DJPaul! Good stuff!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Increase Avatar Quality – Looks Hazy?’ is closed to new replies.
Skip to toolbar