Buddypress Avatar blurred

Hi there,

I notices since a while that buddypress avatars are blurred, even though they were originally uploaded at full quality. I am displaying my avatar at the size of 150x150px. I noticed that in the file wp-content\themes\x\framework\functions\plugins\buddypress.php the defined the max avatar size is 100x100. Could that be the problem? and how could I fix this? The other reason might be that there is still no update do the buddypress nouveau template pack, is it?

thanks a lot

Hi There,

Thanks for writing in!

Please find a solution form here.
https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/

The code should be written in function file of Child theme.

Hope this fixes your issue.

Thanks

Hi,

thanks for your quick reply.
I know how to change it, but the problem is that these settings are already definded in the x-theme settings. (see the file path in my first request). thats why it won´t accept my settings if I put them into the bp-custom.php. I need to overwrite the settings in the mentioned x-theme file.

thanks

Hi Sören,

The avatar size was intentionally implemented as 100x100 for the theme to use and to match the design, but you can still customize it. An example is this, please add this code to your child theme’s functions.php

add_action('bp_core_set_avatar_globals', 'bp_set_avatar_sizes', 9999);

function bp_set_avatar_sizes () {
       
    $bp = buddypress();
	$bp->avatar->thumb->width  = 80;
	$bp->avatar->thumb->height = 80;
	$bp->avatar->full->width   = 200;
	$bp->avatar->full->height  = 200;

}

It still based on Buddypress existing codes. Though, maybe after changing the size, you’ll have to regenerate the images. Like installing force regenerate thumbnails plugin and generate them again.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.