Skip to:
Content
Pages
Categories
Search
Top
Bottom

Poor Avatar quality


  • 3T_MJ
    Participant

    @3t_mj

    I’m struggling with the Buddypress Avatar quality. I’m using a high resolution device and the avatars created by buddypress look ugly.

    I know I can change the size settings using bp-custom.php but this only makes the avatars bigger. If I e.g. set the avatar sizes for 250 (full) and 110 (thumb) and try to change the size using css, it messes the layout. I use the header image option, when shrinking the avatar size using css e.g.the member header is completely messed up.

    Is there an option to set upload sizes and different display sizes for the frontend without messing the layout?

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

  • 3T_MJ
    Participant

    @3t_mj

    Not sure if the problem is image size related or if it’s the compression set for buddypress. The crop preview looks much better than the final avatar pic! Any thoughts how to solve this?


    buddycore
    Participant

    @buddycore

    You may have to go into the template files that call the avatars for example member-header.php or group-header.php or entry.php and change the values like this

    <?php bp_activity_avatar('width=40&height=40'); ?>


    3T_MJ
    Participant

    @3t_mj

    thanks @buddycore but I already did that. I even uploaded a larger avatar to get it resized but not a big difference. So I assume it’s due to the image compression when cropping/resizing. When I edit the image with an image editor and replace the files created by buddypress (given the exact same names and dimensions) it looks far better then having it done with by buddypress. But that’s nothinhg members of the site will be able to do. They rely soley on buddypress.

    Is there a way to set the quality of the avatar when cropiing/resizing?


    danbp
    Participant

    @danbp

    BuddyPress is not Photoshop. The cropper is only cropping, ie from too big to admitted default size.
    Size is dimension (150x150px), not quality (dpi).

    Default avatar are registered in full-size of 150×150 and 50×50 for thumbnails. Both CSS adjusted depending where the avatar is used.

    Adjusting a size from to big to smaller is generally better rendered as going from too small to bigger. But once a picture is cropped, his size fits to what is setup for default_size by WP/BP or you.

    Picture format: jpg or png ? In brief; jpg remain static, png is more elastic. But nothing to do with BuddyPress img handling displaying (avatar, covers).

    To fit img quality – from mobile to retina – you need an original picture of at least 145 dpi, what ever the size and the picture format. Actually for best quality, 300 dpi is a common usage.

    But who knows what your users upload for their avatar ? A 3mo jpeg in 72 dpi 2400 x 1850 or a 30ko jpeg in 150 dpi and 800x600px ? Or an exact and optimized (default) 150X150, jpeg/145dpi of 9 ko ?

    Frankly the only thing you can do in regard of “quality” pictures for BuddyPress, is to use the default size for avatars, eventually adjusted by a few more pixel because of your theme and available place.

    I won’t struggle much with code but inform clearly my user to use a picture of 250×250 max for custom avatar and to respect – so far as possible – the size indicated for a cover img, for which you can recommand a dpi of 150. But without any waranty they obey your recommandations.

    To adjust max cropping size, you can add this to your bp-custom.php file:

    
    /* AVATAR MAX CROP SIZING */
    define ( 'BP_AVATAR_THUMB_WIDTH', 60 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 60 );
    define( 'BP_AVATAR_FULL_WIDTH', 175 );
    define( 'BP_AVATAR_FULL_HEIGHT', 175 );

    3T_MJ
    Participant

    @3t_mj

    well, I did that already. The original pic is a jpg taken with a proper DSLR. But doing the same crop via buddypress and my image editing programme makes a notable difference, it’s set to 72 dpi when editing. Not sure what compression buddypress uses (0.9 or lower?) when storing the image but it seems bad. It seems worse compared to ste crop wordpress does when uploading pics. And to make it worse, the buddypress crop file size is larger compared to doing the same crop with the image editing programme – and that with lower quality. I’m devastated.


    danbp
    Participant

    @danbp

    There is no compression feature in WP or BP. If the source file is 72 dpi, the cropped img is still in 72 px. And 72 dpi is even a poor resolution (equivalent to a 70% compressed jpeg format).

    Read again what i wrote previously.


    buddycore
    Participant

    @buddycore

    You reminded me @danbp worth mentioning that if you upload a larger photo than default cropping dimensions (let’s say 150 x 150) the crop only takes what it sees in the viewport not the actual size of the image.

    So you could crop a face which is small because it’s max-width is 100% of viewport (or parent div) that translated into a small face in a 150 x 150px actual crop. Meaning the crop of a face (larger than 150 x 150) but shows at like 75 x 75 ends up looking pixelated.

    I suggest the BP Devs look at this, it’s pretty antiquated.


    smin
    Participant

    @smin

    You can change:
    bp_member_avatar(); => bp_member_avatar( array( ‘type’ => ‘full’ ) );

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar