Listing all users by their avatars in wordpress

You can jump start by using following example. Here I’ll be listing users and loop through them to display avatar and display name.

<?php
$blogusers = get_users();
// Array of WP_User objects.
foreach ( $blogusers as $user ) {
    /* Here passing user email and avater size */
    echo get_avatar( $user->user_email , 96 );
    echo '<span>' . esc_html( $user->display_name ) . '</span>';
}

Read more about

  1. get_users()
  2. get_avatar()