How to add custom user avatar in wordpress

wp_get_attachment_image_src() returns an array. You want wp_get_attachment_image_url().

$image = wp_get_attachment_image_url($user_meta, 'thumbnail');

tech