Trying to resize Buddypress Profile Avatar/picture

Hi

I have an issue where i’m trying to resize the main buddypress profile picture/avatar i have used the method in which you create a bp-custom.php file. I’ve inserted this in there.

<?php if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) define( 'BP_AVATAR_THUMB_WIDTH', 120 ); //change this with your desired thumb width if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) define( 'BP_AVATAR_THUMB_HEIGHT', 120 ) if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) ) define( 'BP_AVATAR_FULL_WIDTH', 280 ) if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) ) define( 'BP_AVATAR_FULL_HEIGHT', 280 ) ?>

Now i’ve used variations of this code that i’ve found on other sites but it only seems to increase the size of the profile thumbnails in activity feeds and other widgets but it has no effect on the profile picture itself. I’m using pro and i know that it is quite heavily integrated with buddypress is their perhaps a file within the theme i need to add the code to or change the default sizes in? I have deactivated some plugins relative to images and such to see if it was a plugin conflict but no change.

The website is talknz.org you can click the people link on the sticky footer and select either of the profiles in the list and you will see that the profile pictures are still at default sizes.

So just to clarify what i am trying to achieve is a larger profile photo/avatar on the buddypress profile pages.

Any help would be much appreciated.
Thanks

Matt

Hi Matt,

Actually, we did some changes in the theme as there were some incompatibility issues with the legacy templates. If you check the sidebar of the Changelog you will see the report:

I am not sure if the profile picture size goes to this category of the legacy template files, that is why I suggest that you test that. You can do it by Backing Up your website completely and update the theme to version 6.2.0.

The 6.2.0 version is in a manual update and you will not see it in the automatic update yet. That is why you need to follow the manual update guide.

Thank you.

Ok Thank you for the response, could i just get a clarification on the back up. I currently use updraftplus is this a secure enough backup to do a manual update? All data is backed up to my google drive. I’m just a bit concerned about all my data and edits as the website is very close to completion i have both pro and have created a child theme which i currently use. I’am new to wordpress so i don’t fully understand everything but is it possible that i could just update the pro theme or the child version would this be safer?

The method in which i’m looking to update is to just remove pro and then upload the update via the dashboard let me know if this is the safest method? or would it be better to go the ftp route?

Many thanks

Matt

Hi Matt,

The FTP route is better, or even better I suggest that you wait for a day or 2 as we most probably will release the automatic update tomorrow or the next day.

For the backup I suggest that you contact your hosting service provider and ask them to do it. It is the safest way available.

Thank you.

Ok thank you for the heads up regarding the update. I have updated x/pro but still no change, the bp-custom.php file still has no effect on the size of the profile picture.

However i have noticed it does seem to change the size of the image when you go to crop the image when changing your profile picture. Lol I thought this would be an easy edit to just make the profile picture bigger but obviously not. Are there any functions.php files i need to modify? Or is there any file that takes authority over the editing of the profile picture?

Hello There,

Are you referring to this part:

From checking the source code, I can see it has a class item-header-avatar. Inside the theme, the customization with that class can be found here: pro\buddypress\groups\single\group-header.php:.
On that file line 9, you can see thumbnails are called using function: bp_group_avatar();
On other templates, that functions was called like this:
bp_group_avatar( 'type=thumb&width=45&height=45' );
See how type,width and height was defined.
On your child theme, try to create this folder \buddypress\groups\single. On the created folder on your child theme, paste this file group-header.php. The original file is coming from this folder: pro\buddypress\groups\single\group-header.php:. Now, since you have copied that file on your child theme, try to edit the copied file, change line 9
<?php bp_group_avatar(); ?> to
bp_group_avatar( 'type=thumb&width=45&height=45' );
Change values accordingly.

See this too: https://buddypress.org/support/topic/can-group-avatar-size-be-changed/

Hope this helps.

Hi

Look really appreciate you diving into this! Yes that’s exactly what i am wanting to change the dimensions of. I just want them to be made bigger so that people can actually see the picture in good detail where it would most probably be a portrait picture of a person.

I have followed your instructions and created that directory within my child theme version of pro, copied the group-header.php file over and edited the part that you showed me. So it now looks like this.

<?php bp_group_avatar( 'type=thumb&width=260&height=260' ); ?> <?php bp_group_type(); ?> <?php printf( __( 'active %s', '__x__' ), bp_get_group_last_active() ); ?>

But still it has no affect what so ever on the profile picture. I am new to this so maybe pardon my ignorance but are you sure this is for the user profile pages not the group profile pages? Are the user profiles maybe called something else? i don’t know i’m just putting it out there.

Also not sure if this is related to the issue but i have just recently noticed in my plugin list that cornerstone is not activated. When using the content, header, footer editor for pro i have no issues and i have updated it to 3.2.1 but every time i try to activate it, it comes up with this.

Plugin could not be activated because it triggered a fatal error.

Fatal error: Cannot declare class Cornerstone_Plugin_Base, because the name is already in use in /home1/talknzor/public_html/wp-content/plugins/cornerstone/includes/utility/plugin-base.php on line 6

I’m not really concerened to much because the site seems to be running fine but maybe it could be causing this problem?

Thanks so much for the support.

Matt

Hi There,

You don’t have to install and activate the Cornerstone plugin when you use Pro theme. The Cornerstone plugin has been built in Pro.

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link login to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.

Hi

I’m still requiring support with this problem, if anyone has any input it would be much appreciated. A secure note message was sent to thai but i haven’t had any response yet not sure if any ones been able to take a look at the backend and see if there’s anything obviously wrong.

Many thanks

Matt

Hi There,

Next time, please use the secure note button instead of the direct message: https://theme.co/apex/forum/t/how-to-get-support/288/1.

Upon checking your website, I could see that the avatar is loading from socials networks instead of the uploaded avatar. The custom BuddyPress thumb size is only working for the uploaded avatars(https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/).

I could see that your website uses the Super socializer plugin(https://wordpress.org/plugins/super-socializer/), it’s pulling the avatars from Facebook, Google, Twitter. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X/Pro will need to be directed to the original developer.

Thank you for your understanding.

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