Generic function to obtain avatars