BuddyPress Integration

The BuddyPress WordPress plugin is not very well integrated with the WordPress core functions. For example, BuddyPress does not register custom post types with WordPress, nor does it store images in the WordPress Media Library. Both of these integration issues lead to some limitations that can take some effort to overcome.

BuddyPress Avatar and Group Images

By default, member avatars are provided by Gravatar. The NGFB plugin recognizes Gravatar URLs, and can include images of the correct dimensions in the webpage meta tags. If a member changes their default avatar image, or an avatar image is assigned for a group, BuddyPress will save those images with a dimension of 150x150px (by default). This is much too small for Facebook or any other social website to use when a member or group webpage is shared. To include the custom BuddyPress member and group images in the webpage meta tags, you must adjust the BuddyPress full size image dimensions. Add the following to your wp-config.php, and increase the default BP_AVATAR_FULL_WIDTH and BP_AVATAR_FULL_HEIGHT from 150 to 200 or more (larger is better). The thumbnail sizes can remain the same – I’ve included them here, with their default values, for informational purposes only.

If the BP_AVATAR_FULL_WIDTH and BP_AVATAR_FULL_HEIGHT values you’ve chosen are smaller than the Image Dimensions in the NGFB General settings, you will also need to uncheck the Check Image Dimensions option on the Advanced settings page.

As an alternative, you could specify much larger BuddyPress full width and height values, and downsize them on the BuddyPress pages using CSS. The upside is that your member and group images will be featured more prominently on social websites (Facebook prefers images larger than 600×315, for example), but at the expense of larger avatar images being transferred and downsized by the browsers on member and group webpages.

Activity Images and Videos

The BuddyPress activity content is analyzed for images and videos like traditional WordPress Post or Page content. Unfortunately, since BuddyPress does not use the WordPress Media Library functions, images within the content cannot be detected by their image ID alone. This means that image html tags within the activity content must have width and height attributes larger than the Image Dimensions you’ve chosen on the NGFB General settings page (or uncheck the Check Image Dimensions option on the Advanced settings page). If you can, making sure images have correct width and height HTML attributes is the best solution.

Allow Small or Unknown Size Images

If you’re comfortable with WordPress filters and/or PHP code, you can also hook the ‘wpsso_content_accept_img_size’ filter (since NGFB v8.7.4) to accept BudyPress images in activity content that may be too small and/or have an unknown size.


3 thoughts on “BuddyPress Integration

  1. I am considering purchasing the pro version but I want to make sure it does what I need it to do. I want it to share on facebook the full or at least some content of the activity in buddypress, not image but the actual text. Currently using the free version and it only shares the link. Image information is well documented here but I don’t care about sharing images … I care about sharing the text that is written in the activity.

    For instance: http://www.ourgratitudecollective.com/activity/p/86/ If you were logged in you would see the share button under this activity. I would want “A face to face interaction I am grateful for is writing with my friend Amy …” to show up in the facebook post not just a link.

Leave a Reply

Your email address will not be published. Required fields are marked *