Since you are using JomSocial, you need to get the author using JomSocial api.
$jspath = JPATH_BASE.DS.'components'.DS.'com_community';
if(file_exists($jspath.DS.'libraries'.DS.'core.php')){
include_once($jspath.DS.'libraries'.DS.'core.php');
// Get CUser object
$jsuser =& CFactory::getUser($item->created_by);
$usrname = $jsuser->username;
$avatarLoc = $jsuser->getThumbAvatar();
$link = CRoute::_('index.php? option=com_community&view=profile&userid='.$item->created_by.'&Itemid='.JRequest::getInt('Itemid'));
$avatar = '<a href="'.$link.'"><img class="hasTip" style="border: 1px solid #cccccc; height: '.$height.'px;" src="'.$avatarLoc.'" alt="'.$usrname.'" title="'.$usrname.'"/></a>';
echo $avatar;
}Replaced above code in php tags in place of the author name in same file.