diff --git a/core/modules/media/src/MediaTypeForm.php b/core/modules/media/src/MediaTypeForm.php
index 7766af2e56..5f38b20055 100644
--- a/core/modules/media/src/MediaTypeForm.php
+++ b/core/modules/media/src/MediaTypeForm.php
@@ -76,6 +76,9 @@ public function form(array $form, FormStateInterface $form_state) {
     /** @var \Drupal\media\MediaSourceInterface $source */
     $source = $this->entity->get('source') ? $this->entity->getSource() : NULL;
 
+    // Check if the source field can be changed.
+    $source_changeable = $this->isSourceChangeable();
+
     if ($this->operation === 'add') {
       $form['#title'] = $this->t('Add media type');
     }
@@ -118,7 +121,7 @@ public function form(array $form, FormStateInterface $form_state) {
       '#attributes' => ['id' => 'source-dependent'],
     ];
 
-    if ($source) {
+    if (!$source_changeable) {
       $source_description = $this->t('<em>The media source cannot be changed after the media type is created.</em>');
     }
     else {
@@ -141,7 +144,7 @@ public function form(array $form, FormStateInterface $form_state) {
       '#required' => TRUE,
       // Once the media type is created, its source plugin cannot be changed
       // anymore.
-      '#disabled' => !empty($source),
+      '#disabled' => !$source_changeable,
     ];
 
     if (!$source) {
@@ -392,4 +395,81 @@ public function save(array $form, FormStateInterface $form_state) {
     $form_state->setRedirectUrl($media_type->toUrl('collection'));
   }
 
+  /**
+   * Check if the source is changeable.
+   *
+   * @return bool
+   *   Whether the source can be changed or not.
+   *
+   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
+   */
+  protected function isSourceChangeable() {
+    return $this->entity->isNew && ($this->fieldMapEmpty() || $this->hasOnlySourceField() || $this->entityCount() > 0);
+  }
+
+  /**
+   * Get the number of entities of this media type.
+   *
+   * @return int
+   *   The number of entities.
+   *
+   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
+   */
+  protected function entityCount() {
+    return $this->entityTypeManager->getStorage('media')->getQuery()
+      ->condition('bundle', $this->entity->id())
+      ->count()
+      ->execute();
+  }
+
+  /**
+   * Check if the source field is the only field.
+   *
+   * @return bool
+   *   If the source field is the only field.
+   */
+  protected function hasOnlySourceField() {
+    if ($this->entity->isNew()) {
+      return TRUE;
+    }
+
+    $source = $this->entity->getSource();
+    $source_field = $source->getSourceFieldDefinition($this->entity);
+
+    $field_definitions = $this->entityFieldManager->getFieldDefinitions('media', $this->entity->id());
+    $base_fields = $this->entityFieldManager->getBaseFieldDefinitions('media');
+
+    $fields = array_diff_key($field_definitions, $base_fields);
+    unset($fields[$source_field->getName()]);
+
+    if ($fields && !count($fields)) {
+      return TRUE;
+    }
+
+    return FALSE;
+  }
+
+  /**
+   * Check if the values in the field map are empty.
+   *
+   * @return bool
+   *   Field map values empty or not.
+   */
+  protected function fieldMapEmpty() {
+    $field_map = $this->entity->getFieldMap();
+
+    foreach ($field_map as $key => $value) {
+      if ($value !== MediaSourceInterface::METADATA_FIELD_EMPTY) {
+        continue;
+      }
+      unset($field_map[$key]);
+    }
+
+    if (!$field_map) {
+      return TRUE;
+    }
+
+    return FALSE;
+  }
+
 }
