How do I get my user picture back? Apparently if you take the "minimal" installation, it does not create the user picture field. I tried to manually create it, but now the Simple Facebook Connect module is not synching profile images, because it can't find the default user_picture field. 

This is what the facebook module does:

// Try to download the profile picture and add it to user fields.
if (user_picture_enabled() &amp;&amp; $picture_url) {
  if ($file = $this-&gt;downloadProfilePic($picture_url, $fbid)) {
    $fields['user_picture'] = $file-&gt;id();
  }
}
$new_user = User::create($fields);
$new_user-&gt;save();


I can confirm that it is able to get the $file, but the problem has something to do with the fields.

How do I correct recreate the "user_picture" field?

This is returning false:

function user_picture_enabled() {
      $field_definitions = \Drupal::entityManager()-&gt;getFieldDefinitions('user', 'user');
      return isset($field_definitions['user_picture']);
}


How do I add this field definition again?

I looked in the minimal.install file. I was hoping to find the code that enables user_picture, but all I could find was:

\Drupal::configFactory()-&gt;getEditable('system.theme.global')-&gt;set('features.node_user_picture', FALSE)-&gt;save(TRUE);


There is nothing in standard.install. I tried running the following, without any luck.

\Drupal::configFactory()-&gt;getEditable('system.theme.global')-&gt;set('features.node_user_picture', TRUE)-&gt;save(TRUE);


How do I get my user_picture field back without adding it manually, since I would end up with field_user_picture?
User pictures are no longer guaranteed to exist in Drupal 8. It is added by the standard profile, but not added if you use the minimal profile.

$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']);
$file-&gt;getFileUri();