How do I access a user image?
Use the following snippet to get the user image.

$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()-&gt;id());
$picture = $user-&gt;get('user_picture')-&gt;entity-&gt;url();


If you want to get the default image when the user account doesn't have an image associated, use the following code.

$field = \Drupal\field\Entity\FieldConfig::loadByName('user', 'user', 'user_picture');
$default_image = $field-&gt;getSetting('default_image');
$file = \Drupal::entityManager()-&gt;loadEntityByUuid('file', $default_image['uuid']);
$picture = file_create_url($file-&gt;getFileUri());