diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
index 16160b25c6..7c99c8e8ff 100644
--- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
+++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
@@ -212,6 +212,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/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php
new file mode 100644
index 0000000000..5b66cb7826
--- /dev/null
+++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace Drupal\Tests\image\FunctionalJavascript;
+
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver;
+use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+use Drupal\node\Entity\Node;
+use Drupal\Tests\image\Kernel\ImageFieldCreationTrait;
+use Drupal\Tests\TestFileCreationTrait;
+
+/**
+ * Tests the image field widget with multiple ajax uploads.
+ *
+ * @group image
+ */
+class ImageFieldWidgetMultipleTest extends JavascriptTestBase {
+
+  use ImageFieldCreationTrait;
+  use TestFileCreationTrait;
+
+  protected $minkDefaultDriverClass = DrupalSelenium2Driver::class;
+
+  protected static $modules = ['node', 'image', 'field_ui'];
+
+  /**
+   * Tests file widget element allowing multiple images.
+   */
+  public function testWidgetElementMultipleUploads() {
+    $image_factory = \Drupal::service('image.factory');
+    $file_system = \Drupal::service('file_system');
+
+    $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
+    $field_name = 'images';
+    $storage_settings = ['cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED];
+    $field_settings = ['alt_field_required' => 0];
+    $this->createImageField($field_name, 'article', $storage_settings, $field_settings);
+    $this->drupalLogin($this->drupalCreateUser(['access content', 'create article content']));
+    $this->drupalGet('node/add/article');
+    $this->xpath('//input[@name="title[0][value]"]')[0]->setValue('Test');
+
+    $images = $this->getTestFiles('image');
+    $test_images = [
+      $file_system->realpath($images[5]->uri),
+      $file_system->realpath($images[7]->uri),
+    ];
+    $multiple_field = $this->xpath('//input[@multiple]')[0];
+    $multiple_field->setValue(implode("\n", $test_images));
+    $this->getSession()->getPage()->findButton('Save')->click();
+
+    $node = Node::load(1);
+    foreach ($test_images as $delta => $test_image_uri) {
+      $node_image = $node->{$field_name}[$delta];
+      $original_image = $image_factory->get($test_image_uri);
+      $this->assertEquals($node_image->width, $original_image->getWidth(), "Correct width of image #$delta");
+      $this->assertEquals($node_image->height, $original_image->getHeight(), "Correct height of image #$delta");
+    }
+  }
+
+}
