By default, the platform limits the uploading of profile and cover images to 5MB. But if you want to modify them, you can use the PHP snippet below.


Please follow the steps and make sure to create a backup before proceeding:


1. Go to Appearance > Theme Editor.

2. Under Select theme to edit, choose (BuddyBoss Child/the currently active theme), then click Select.

3. Below Theme Files, select Theme Functions (functions.php).

4. Append the code just before the closing PHP tag “?>”:

/* Adjust PROFILE COVER upload limit */
function bbp_cover_image_max_upload_file_size( $fileupload_maxk, $type ) {
 if ( 'cover_image' == $type ) {
 $fileupload_maxk = 10485760; // in bytes, 10MB
 }
 return $fileupload_maxk;
}
add_filter( 'bp_attachments_get_max_upload_file_size', 'bbp_cover_image_max_upload_file_size', 10,2 );

/* Adjust PROFILE AVATAR upload limit */
add_filter( 'bp_core_avatar_original_max_filesize', function() {
    return 10485760; // in bytes, 10MB
} );

Note: the code above sets the limitation to 10MB. You may adjust it by modifying the numerical value 10485760 to any number in bytes.


5. Click Update File to save the changes.




Note: Any modifications are considered as custom work already. Know more about our Support Policy here: https://www.buddyboss.com/support-policy/