That's done using our fields API.
www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18361-obtaining-field-values-through-getfields-api
You'd just be pulling in their avatar field for rendering. Profile view is full size image of the avatar without profile link. List view is thumbnail size of the image with profile link, but that can be turned off. Below are some examples.
Full Size (No Link):
Code:
CBuser::getInstance( USER_ID_HERE, false )->getField( 'avatar' );
Thumbnail (With Link)
Code:
CBuser::getInstance( USER_ID_HERE, false )->getField( 'avatar', null, 'html', 'none', 'list', 0, true );
Thumbnail (Without Link)
Code:
CBuser::getInstance( USER_ID_HERE, false )->getField( 'avatar', null, 'html', 'none', 'list', 0, true, [ '_allowProfileLink' => false ] );
Replace USER_ID_HERE with the user id you're trying to get the avatar for. Note you need to first include CBs API as shown below for external usage.
www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18357-including-cb-api-for-usage-outside-of-cb