diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
index 10ebfb5..7aed5e7 100644
--- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
+++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
@@ -175,6 +175,12 @@ public static function process($element, FormStateInterface $form_state, $form)
         $variables['width'] = $element['#value']['width'];
         $variables['height'] = $element['#value']['height'];
       }
+      // In the case of a multiple upload, do not retrieve the image dimensions
+      // as it can lead to all images having the same dimensions. The correct
+      // dimensions will be calculated in ImageItem::preSave().
+      elseif (count($element['#files']) > 1) {
+        $variables['width'] = $variables['height'] = NULL;
+      }
       else {
         $image = \Drupal::service('image.factory')->get($file->getFileUri());
         if ($image->isValid()) {
diff --git a/core/modules/image/src/Tests/ImageFieldWidgetTest.php b/core/modules/image/src/Tests/ImageFieldWidgetTest.php
index 8bc70bc..6c94887 100644
--- a/core/modules/image/src/Tests/ImageFieldWidgetTest.php
+++ b/core/modules/image/src/Tests/ImageFieldWidgetTest.php
@@ -7,6 +7,9 @@
 
 namespace Drupal\image\Tests;
 
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\node\Entity\Node;
+
 /**
  * Tests the image field widget.
  *
@@ -15,11 +18,31 @@
 class ImageFieldWidgetTest extends ImageFieldTestBase {
 
   /**
+   * @var \Drupal\Core\File\FileSystem
+   */
+  protected $fileSystem;
+
+  /**
+   * @var \Drupal\Core\Image\ImageFactory
+   */
+  protected $imageFactory;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->fileSystem = $this->container->get('file_system');
+    $this->imageFactory = $this->container->get('image.factory');
+  }
+
+  /**
    * Tests file widget element.
    */
   public function testWidgetElement() {
-     // Check for image widget in add/node/article page
-    $field_name = strtolower($this->randomMachineName());
+    // Check for image widget in add/node/article page
+    $field_name = 'image';
     $min_resolution = 50;
     $max_resolution = 100;
     $field_settings = array(
@@ -27,10 +50,35 @@ public function testWidgetElement() {
       'min_resolution' => $min_resolution . 'x' . $min_resolution,
       'alt_field' => 0,
     );
-    $this->createImageField($field_name, 'article', array(), $field_settings);
+    $this->createImageField($field_name, 'article', array('cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED), $field_settings);
     $this->drupalGet('node/add/article');
     $this->assertNotEqual(0, count($this->xpath('//div[contains(@class, "field--widget-image-image")]')), 'Image field widget found on add/node page', 'Browser');
+
+    // @todo Use the new drupalGetTestImageFile() when
+    // https://www.drupal.org/node/2377747 gets committed.
+    $test_images = [
+      // image-2.jpg
+      0 => $this->drupalGetTestFiles('image')[5],
+      // image-1.png
+      1 => $this->drupalGetTestFiles('image')[7],
+    ];
+    $edit = ['files[' . $field_name . '_0][]' => []];
+    foreach ($test_images as $delta => $test_image) {
+      $edit['files[' . $field_name . '_0][]'][$delta] = $this->fileSystem->realpath($test_image->uri);
+    }
+    $this->drupalPostAjaxForm(NULL, $edit, $field_name . '_0_upload_button');
+    $this->drupalPostForm(NULL, array('title[0][value]' => 'Image upload'), 'Save and publish');
+    $node = Node::load(1);
+    foreach ($node->{$field_name} as $delta => $image) {
+      $test_image = $test_images[$delta];
+      $original_image = $this->imageFactory->get($test_image->uri);
+      if ($original_image->getWidth() > $max_resolution || $original_image->getHeight() > $max_resolution) {
+        $original_image->scale($max_resolution, $max_resolution);
+      }
+
+      $this->assertEqual($image->width, $original_image->getWidth(), 'Stored width of image #' . $delta . ' is ' . $original_image->getWidth() . 'px');
+      $this->assertEqual($image->height, $original_image->getHeight(), 'Stored height of image #' . $delta . ' is ' . $original_image->getHeight() . 'px');
+    }
   }
 
 }
-
