BuddyDev

Search

Poor Profile Avatar Quality

  • Participant
    Level: Initiated
    Posts: 10
    Emmanuel Johnson on #48327

    Buddypress seems to be reducing the quality of the profile avatar. Whenever I upload a photo for my profile image, the photo gets very dull.

    Any idea on this, someone kindly help me.

  • Keymaster
    (BuddyDev Team)
    Posts: 24210
    Brajesh Singh on #48342

    Hi,
    Thank you for the question.

    BuddyPress does set the quality to 90%. You can change that with the following code.

    
    // update quality parameters for avatar upload.
    add_filter( 'attachment_avatar_edit_image', function ( $args ) {
    	$args['quality'] = 100;
    
    	return $args;
    } );
    
    

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 496
    Daniel on #48348

    Hi guys,

    Can the quality of the tiny little avatar on the post activity also be increased this way because the little avatar also looks blurry.

    Thanks for the input.

    Regards
    Daniel

  • Participant
    Level: Initiated
    Posts: 10
    Emmanuel Johnson on #48349

    I Brajesh, I tried that bud didn’t notice anything.
    It turned out that I had to increase the avatar size cropped, https://buddydev.com/changing-default-avatar-size-croppedused-by-buddypress/, very high, eg. 900px, and it worked. I don’t know if that is advisable though, but I might end up using an image optimizer plugin if there is any problem.

    However, I am facing a problem. The cropper size also increased and can not fit on the page, to which extent I can’t see all the cropper, most especially on mobile devices.

    Is there any way to reduce the cropper and maintain the size(900px).

    Thank you very much for the help.

  • Participant
    Level: Initiated
    Posts: 10
    Emmanuel Johnson on #48351

    Or is there a way to work on the avatar size cropped, and prevent it from decreasing the image quality.

  • Keymaster
    (BuddyDev Team)
    Posts: 24210
    Brajesh Singh on #48352

    Hi Emmanuel,
    Thank you for the reply.

    If the change in quality parameter is not working, Your best bet is to report it on BuddyPress trac.

    As a thirdparty developer, we have limited entry points to the behaviour.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved