Display post author avatar for Ultimate Member

I want to show avatar from the post author. I use Ultimate Members and want to show the avatars that are defined via UM.

<?php
global $post;
$url = get_avatar_url( $post, array( ‘size’ => 48 ));
$img = ‘<img alt=”” src=”‘. $url .'”>’;
echo $img;
?>

But this code shows the gravatars or default avatar. How can I get the avatars from Ultimate Member?

Read more here:: Display post author avatar for Ultimate Member

Leave a Reply

Your email address will not be published. Required fields are marked *