Avatar Buddy Press from local Profile

Have tried to set-up buddy press on an existing theme for various functionalites, One hurdle i face is that the avatar in buddy press does not pick the one i have in the theme, So i am trying to update the avatar from BP through a line of code when we change the profile on the theme, but i cant figure out the right line of code to do that!

Here is the code that is used to get the profile picture :

<div class="large-6 small-6 columns upload-gravatar">
<?php hrb_gravatar_media_manager( $user_id,
array(
'id' => '_app_gravatar',
'upload_text' => __( 'Attach Photo', APP_TD ),
'manage_text' => __( 'Change Photo', APP_TD ),
)
);
?>
<p class="rw_avtar_inst"><?php esc_html_e('Please add image with width of 100 and height of 100', APP_TD);?>
</div>

to display the user gravatar in other parts of the theme they use this :

<div class="user-gravatar"><?php the_hrb_user_gravatar( $dashboard_user->ID, 75 ); ?></div>

so in my understanding if i manage to pass value from : the_hrb_user_gravatar to the xprofile avatar it should work