Default user image in user account menu!
You can check if a user picture exists this way:

if (!$user-&gt;user_picture-&gt;isEmpty()) {
  $picture = file_create_url($file-&gt;getFileUri());
  $picture = $user-&gt;user_picture-&gt;view('large');
} else {
  $picture_field = \Drupal\field\Entity\FieldConfig::loadByName('user', 'user', 'user_picture');
  $default_image = $picture_field-&gt;getSetting('default_image');
  $file = \Drupal::entityManager()-&gt;loadEntityByUuid('file', $default_image['uuid']);
  $picture = $file-&gt;getFileUri();
}