diff --git a/core/modules/media/media.module b/core/modules/media/media.module
index dc2d898..fdd66b1 100644
--- a/core/modules/media/media.module
+++ b/core/modules/media/media.module
@@ -8,7 +8,9 @@
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\field\FieldConfigInterface;
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
@@ -96,3 +98,46 @@ function template_preprocess_media(array &$variables) {
     $variables['content'][$key] = $variables['elements'][$key];
   }
 }
+
+/**
+ * Implements hook_ENTITY_TYPE_presave().
+ */
+function media_entity_view_display_presave(EntityViewDisplayInterface $display) {
+  // Don't do anything during config sync.
+  if (\Drupal::isConfigSyncing()) {
+    return;
+  }
+
+  // Check if new components were added to this display.
+  $new_components = [];
+  if (isset($display->original)) {
+    $new_components = array_diff_key($display->getComponents(), $display->original->getComponents());
+  }
+  if (empty($new_components)) {
+    return;
+  }
+
+  // Get entity_reference fields that point to media entities.
+  $fields = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions($display->getTargetEntityTypeId());
+  $fields = array_filter($fields, function (FieldStorageDefinitionInterface $field) {
+    return $field->getType() == 'entity_reference' && $field->getSetting('target_type') === 'media';
+  });
+  if (empty($fields)) {
+    return;
+  }
+
+  // If any of these fields was just added, configure it to use the "Rendered
+  // entity" formatter, instead of the default formatter ("Label").
+  $new_components = array_intersect_key($new_components, $fields);
+  foreach ($new_components as $key => $component) {
+    $display->setComponent($key, [
+      'type' => 'entity_reference_entity_view',
+      'weight' => $component['weight'],
+      'settings' => [
+        'view_mode' => 'default',
+        'link' => FALSE,
+      ],
+      'region' => 'content',
+    ]);
+  }
+}
diff --git a/core/modules/media/tests/src/Kernel/MediaEntityReferenceFieldTest.php b/core/modules/media/tests/src/Kernel/MediaEntityReferenceFieldTest.php
new file mode 100644
index 0000000..30e7db9
--- /dev/null
+++ b/core/modules/media/tests/src/Kernel/MediaEntityReferenceFieldTest.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace Drupal\Tests\media\Kernel;
+
+use Drupal\Core\Entity\Entity\EntityViewDisplay;
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
+
+/**
+ * Tests the behavior of entity_reference fields pointing to media entities.
+ *
+ * @group media
+ */
+class MediaEntityReferenceFieldTest extends MediaKernelTestBase {
+
+  /**
+   * Test that out of the box the media asset is shown as rendered entity.
+   */
+  public function testRenderedEntityReferencedMedia() {
+
+    $display = EntityViewDisplay::create([
+      'targetEntityType' => 'media',
+      'bundle' => $this->testMediaType->id(),
+      'mode' => 'default',
+    ]);
+    $display->save();
+
+    $display = EntityViewDisplay::load("media.{$this->testMediaType->id()}.default");
+    $this->assertTrue(!empty($display));
+
+    FieldStorageConfig::create([
+      'field_name' => 'field_referenced_media',
+      'type' => 'entity_reference',
+      'entity_type' => 'media',
+      'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
+      'settings' => [
+        'target_type' => 'media',
+      ],
+    ])->save();
+
+    FieldConfig::create([
+      'field_name' => 'field_referenced_media',
+      'entity_type' => 'media',
+      'bundle' => $this->testMediaType->id(),
+      'label' => 'Reference to media',
+      'settings' => [],
+    ])->save();
+
+    $display->setComponent('field_referenced_media', [
+      'type' => 'entity_reference_label',
+      'weight' => 10,
+      'settings' => ['link' => TRUE],
+    ])->save();
+    $display = \Drupal::entityTypeManager()->getStorage('entity_view_display')->loadUnchanged("media.{$this->testMediaType->id()}.default");
+    // Check that our hook changes that to be "Rendered Entity".
+    $this->assertEquals('entity_reference_entity_view', $display->getComponent('field_referenced_media')['type']);
+  }
+
+}
