get_avatar from user id

To display users with specific ID’s on a page you’ll need to run a WP_User_Query, either by placing the following code in your functions.php and calling it with a shortcode or adding it to the page template:

//Replace the numbers 1, 2 with the user ID's to return
$args = array(
    'include' => array( 1, 2 )
);

// The Query
$user_query = new WP_User_Query( $args );

// User Loop
if ( ! empty( $user_query->results ) ) {
    foreach ( $user_query->results as $user ) {
        echo '<p>' . $user->display_name . '</p>';
        echo get_avatar( $user->ID, 120);
    }
} else {
    echo 'No users found.';
}