How do I render the 'user_picture' of a user account? I load a user object, and I would like to be able to show the user's picture somewhere. I tried the following code.

$row_user = \Drupal\user\Entity\User::load($uid)-&gt;user_picture-&gt;first()-&gt;view('large');


What I get is this (using kint()).



This user has a picture and it is shown correctly in the user page.

How do I exactly show the picture associated with a user account?
Just like every other render array, render it.

If you print it out in twig, that just works, in PHP, use \Drupal::service('renderer')-&gt;render().