diff --git a/core/modules/editor/editor.admin.inc b/core/modules/editor/editor.admin.inc
index 83bc2cf..d575e9c 100644
--- a/core/modules/editor/editor.admin.inc
+++ b/core/modules/editor/editor.admin.inc
@@ -5,6 +5,7 @@
  * Administration functions for editor.module.
  */
 
+use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\StreamWrapper\StreamWrapperInterface;
 use Drupal\editor\Entity\Editor;
 
@@ -96,6 +97,7 @@ function editor_image_upload_settings_form(Editor $editor) {
     '#field_suffix' => '</div>',
     '#description' => t('Images larger than these dimensions will be scaled down.'),
     '#states' => $show_if_image_uploads_enabled,
+    '#element_validate' => array('editor_image_upload_settings_validate_dimension'),
   );
   $form['max_dimensions']['width'] = array(
     '#title' => t('Width'),
@@ -126,3 +128,25 @@ function editor_image_upload_settings_form(Editor $editor) {
 
   return $form;
 }
+
+/**
+ * #element_validate handler for the "max_dimensions" element.
+ *
+ * @see editor_image_upload_settings_form()
+ *
+ * @param array $element
+ *   The form element.
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
+ *   The form state.
+ */
+function editor_image_upload_settings_validate_dimension(array $element, FormStateInterface $form_state) {
+  $dimensions = $form_state->getValue(['editor', 'settings', 'plugins', 'drupalimage', 'image_upload', 'max_dimensions']);
+  if (!empty($dimensions['width']) || !empty($dimensions['height'])) {
+    foreach ($dimensions as $dimension => $value) {
+      if (!$value) {
+        $form_state->setError($element[$dimension], t('Both a height and width value must be specified in the %name field.', ['%name' => $element['#title']]));
+        return;
+      }
+    }
+ }
+}
diff --git a/core/modules/editor/src/Tests/EditorSettingsValidationTest.php b/core/modules/editor/src/Tests/EditorSettingsValidationTest.php
new file mode 100644
index 0000000..6316a58
--- /dev/null
+++ b/core/modules/editor/src/Tests/EditorSettingsValidationTest.php
@@ -0,0 +1,135 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\editor\Tests\EditorSettingsValidationTest.
+ */
+
+namespace Drupal\editor\Tests;
+
+use Drupal\Core\Url;
+use Drupal\editor\Entity\Editor;
+use Drupal\filter\Entity\FilterFormat;
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests dimension validation of Editor image settings.
+ *
+ * @group editor
+ */
+class EditorSettingsValidationTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['editor', 'ckeditor'];
+
+  /**
+   * A user with permission as administer for testing.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // Add text format.
+    FilterFormat::create([
+      'format' => 'basic_html',
+      'name' => 'Basic HTML',
+      'weight' => 0,
+    ])->save();
+
+    // Set up text editor.
+    Editor::create([
+      'format' => 'basic_html',
+      'editor' => 'ckeditor',
+      'image_upload' => [
+        'max_dimensions' => [
+          'width' => '',
+          'height' => '',
+        ],
+      ],
+    ])->save();
+
+    // Create admin user.
+    $this->adminUser = $this->drupalCreateUser(['administer filters']);
+    $this->drupalLogin($this->adminUser);
+  }
+
+  /**
+   * Tests dimension validation.
+   */
+  public function testEditorSettingsValidation() {
+    // Case 1: Set width but don't set height.
+    $this->setMaxDimensions('basic_html', '300', '');
+    $this->assertRaw(t('Both a height and width value must be specified in the %name field.', ['%name' => 'Maximum dimensions']));
+    $this->assertSavedMaxDimensions('', '');
+
+    // Case 2: Set height but don't set width.
+    $this->setMaxDimensions('basic_html', '', '400');
+    $this->assertRaw(t('Both a height and width value must be specified in the %name field.', ['%name' => 'Maximum dimensions']));
+    $this->assertSavedMaxDimensions('', '');
+
+    // Case 3: Set both height and width.
+    $width = '123';
+    $height = '456';
+    $this->setMaxDimensions('basic_html', $width, $height);
+    $this->assertSavedMaxDimensions($width, $height);
+    $this->assertRaw(t('The text format %format has been updated.', ['%format' => 'Basic HTML']));
+
+    // Case 4: Set both height and width as empty values.
+    $width = '';
+    $height = '';
+    $this->setMaxDimensions('basic_html', $width, $height);
+    $this->assertSavedMaxDimensions($width, $height);
+    $this->assertRaw(t('The text format %format has been updated.', ['%format' => 'Basic HTML']));
+  }
+
+  /**
+   * Sets the maximum image dimensions using the UI.
+   *
+   * @param string $format
+   *   The text format whose associated text editor will be updated.
+   * @param string $width
+   *   The maximum width for the associated text editor's image upload settings.
+   * @param string $height
+   *   The maximum height for the associated text editor's image upload
+   *   settings.
+   */
+  protected function setMaxDimensions($format_id, $width, $height) {
+    $edit = [
+      'editor[settings][plugins][drupalimage][image_upload][max_dimensions][width]' => $width,
+      'editor[settings][plugins][drupalimage][image_upload][max_dimensions][height]' => $height,
+    ];
+    $this->drupalPostForm(Url::fromRoute('entity.filter_format.edit_form', ['filter_format' => $format_id]), $edit, t('Save configuration'));
+  }
+
+  /**
+   * Asserts whether the saved maximum dimensions equal the ones provided.
+   *
+   * @param string $width
+   *   The expected width of the uploaded image.
+   * @param string $height
+   *   The expected height of the uploaded image.
+   *
+   * @return bool
+   */
+  protected function assertSavedMaxDimensions($width, $height) {
+    $image_upload_settings = Editor::load('basic_html')->getImageUploadSettings();
+    $expected = [
+      'width' => $image_upload_settings['max_dimensions']['width'],
+      'height' => $image_upload_settings['max_dimensions']['height'],
+    ];
+    $same_width = $this->assertEqual($width, $expected['width'], 'Actual width of "' . $width . '" equals the expected width of "' . $expected['width'] . '"');
+    $same_height = $this->assertEqual($height, $expected['height'], 'Actual height of "' . $height . '" equals the expected width of "' . $expected['height'] . '"');
+    return $same_width && $same_height;
+  }
+
+}
