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 Open Graph+ 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 Open Graph+ General settings, you will also need to uncheck the Ignore Small Images 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 Open Graph+ General settings page (or uncheck the Ignore Small Images option on the Advanced settings page). If you can, making sure images have correct width and height HTML attributes is the best solution.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>