diff --git a/core/modules/node/src/Tests/PagePreviewTest.php b/core/modules/node/src/Tests/PagePreviewTest.php
index 44a280f..1c2d225 100644
--- a/core/modules/node/src/Tests/PagePreviewTest.php
+++ b/core/modules/node/src/Tests/PagePreviewTest.php
@@ -12,6 +12,8 @@
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\entity_reference\Tests\EntityReferenceTestTrait;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\node\Entity\NodeType;
 
 /**
@@ -29,7 +31,7 @@ class PagePreviewTest extends NodeTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'taxonomy', 'comment');
+  public static $modules = array('node', 'taxonomy', 'comment', 'image', 'file');
 
   /**
    * The name of the created field.
@@ -68,6 +70,25 @@ protected function setUp() {
 
     $this->term = $term;
 
+    // Create an image field.
+    FieldStorageConfig::create([
+      'field_name' => 'field_image',
+      'entity_type' => 'node',
+      'type' => 'image',
+      'settings' => [],
+      'cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED,
+    ])->save();
+
+    $field_config = FieldConfig::create([
+      'field_name' => 'field_image',
+      'label' => 'Images',
+      'entity_type' => 'node',
+      'bundle' => 'page',
+      'required' => FALSE,
+      'settings' => [],
+    ]);
+    $field_config->save();
+
     // Create a field.
     $this->fieldName = Unicode::strtolower($this->randomMachineName());
     $handler_settings = array(
@@ -95,6 +116,17 @@ protected function setUp() {
         'type' => 'entity_reference_label',
       ))
       ->save();
+
+    entity_get_form_display('node', 'page', 'default')
+      ->setComponent('field_image', array(
+        'type' => 'image_image',
+        'settings' => [],
+      ))
+      ->save();
+
+    entity_get_display('node', 'page', 'default')
+      ->setComponent('field_image')
+      ->save();
   }
 
   /**
@@ -110,7 +142,14 @@ function testPagePreview() {
     $edit[$title_key] = $this->randomMachineName(8);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$term_key] = $this->term->getName();
-    $this->drupalPostForm('node/add/page', $edit, t('Preview'));
+
+    // Upload an image.
+    $test_image = current($this->drupalGetTestFiles('image', 39325));
+    $edit['files[field_image_0][]'] = drupal_realpath($test_image->uri);
+    $this->drupalPostForm('node/add/page', $edit, t('Upload'));
+
+    // Add an alt tag and preview the node.
+    $this->drupalPostForm(NULL, ['field_image[0][alt]' => 'Picture of llamas'], t('Preview'));
 
     // Check that the preview is displaying the title, body and term.
     $this->assertTitle(t('@title | Drupal', array('@title' => $edit[$title_key])), 'Basic page title is preview.');
@@ -141,6 +180,7 @@ function testPagePreview() {
     $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
     $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');
     $this->assertFieldByName($term_key, $edit[$term_key] . ' (' . $this->term->id() . ')', 'Term field displayed.');
+    $this->assertFieldByName('field_image[0][alt]', 'Picture of llamas');
 
     // Return to page preview to check everything is as expected.
     $this->drupalPostForm(NULL, array(), t('Preview'));
@@ -156,8 +196,9 @@ function testPagePreview() {
     $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');
     $this->assertFieldByName($term_key, $edit[$term_key] . ' (' . $this->term->id() . ')', 'Term field displayed.');
 
-    // Save the node.
-    $this->drupalPostForm('node/add/page', $edit, t('Save'));
+    // Save the node - this is a new POST, so we need to upload the image.
+    $this->drupalPostForm('node/add/page', $edit, t('Upload'));
+    $this->drupalPostForm(NULL, ['field_image[0][alt]' => 'Picture of llamas'], t('Save'));
     $node = $this->drupalGetNodeByTitle($edit[$title_key]);
 
     // Check the term was displayed on the saved node.
