diff --git a/core/lib/Drupal/Core/Image/Image.php b/core/lib/Drupal/Core/Image/Image.php
index 8c8aea2..6350cf1 100644
--- a/core/lib/Drupal/Core/Image/Image.php
+++ b/core/lib/Drupal/Core/Image/Image.php
@@ -75,6 +75,14 @@ public function isValid() {
   /**
    * {@inheritdoc}
    */
+  public function setValid($valid) {
+    $this->valid = $valid;
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getHeight() {
     return $this->getToolkit()->getHeight();
   }
@@ -157,10 +165,10 @@ public function save($destination = NULL) {
    *   image information is populated.
    */
   protected function parseFile() {
-    if ($this->valid = $this->getToolkit()->parseFile()) {
+    if ($this->getToolkit()->parseFile()) {
       $this->fileSize = filesize($this->source);
     }
-    return $this->valid;
+    return $this->isValid();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Image/ImageInterface.php b/core/lib/Drupal/Core/Image/ImageInterface.php
index 02db478..43e0950 100644
--- a/core/lib/Drupal/Core/Image/ImageInterface.php
+++ b/core/lib/Drupal/Core/Image/ImageInterface.php
@@ -21,6 +21,16 @@
   public function isValid();
 
   /**
+   * Sets the image validity flag.
+   *
+   * @param bool $valid
+   *   TRUE if the image object contains a valid image, FALSE otherwise.
+   *
+   * @return $this
+   */
+  public function setValid($valid);
+
+  /**
    * Returns the height of the image.
    *
    * @return int|null
diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
index c1a29a6..78a681e 100644
--- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
+++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
@@ -35,6 +35,13 @@ class GDToolkit extends ImageToolkitBase {
   protected $type;
 
   /**
+   * Image information from a file, available prior to loading the GD resource.
+   *
+   * @var array
+   */
+  protected $preLoadInfo;
+
+  /**
    * Sets the GD image resource.
    *
    * @param resource $resource
@@ -50,11 +57,18 @@ public function setResource($resource) {
   /**
    * Retrieves the GD image resource.
    *
-   * @return resource
-   *   The GD image resource.
+   * @return resource|null
+   *   The GD image resource, or NULL if not available.
    */
   public function getResource() {
-    return $this->resource;
+    if (isset($this->resource)) {
+      return $this->resource;
+    }
+    elseif ($this->getImage()->isValid() && isset($this->preLoadInfo) && $this->load()) {
+      unset($this->preLoadInfo);
+      return $this->resource;
+    }
+    return NULL;
   }
 
   /**
@@ -92,16 +106,23 @@ protected function load() {
     $function = 'imagecreatefrom' . image_type_to_extension($this->getType(), FALSE);
     if (function_exists($function) && $resource = $function($this->getImage()->getSource())) {
       $this->setResource($resource);
-      if (!imageistruecolor($resource)) {
+      if (imageistruecolor($resource)) {
+        return TRUE;
+      }
+      else {
         // Convert indexed images to true color, so that filters work
         // correctly and don't result in unnecessary dither.
         $new_image = $this->createTmp($this->getType(), imagesx($resource), imagesy($resource));
-        imagecopy($new_image, $resource, 0, 0, 0, 0, imagesx($resource), imagesy($resource));
-        imagedestroy($resource);
-        $this->setResource($new_image);
+        if ($ret = (bool) $new_image) {
+          imagecopy($new_image, $resource, 0, 0, 0, 0, imagesx($resource), imagesy($resource));
+          imagedestroy($resource);
+          $this->setResource($new_image);
+        }
+        $this->getImage()->setValid($ret);
+        return $ret;
       }
-      return (bool) $this->getResource();
     }
+    $this->getImage()->setValid(FALSE);
     return FALSE;
   }
 
@@ -151,9 +172,11 @@ public function parseFile() {
     $data = @getimagesize($this->getImage()->getSource());
     if ($data && in_array($data[2], static::supportedTypes())) {
       $this->setType($data[2]);
-      $this->load();
-      return (bool) $this->getResource();
+      $this->preLoadInfo = $data;
+      $this->getImage()->setValid(TRUE);
+      return TRUE;
     }
+    $this->getImage()->setValid(FALSE);
     return FALSE;
   }
 
@@ -215,6 +238,9 @@ public function createTmp($type, $width, $height) {
    * {@inheritdoc}
    */
   public function getWidth() {
+    if (isset($this->preLoadInfo)) {
+      return $this->preLoadInfo[0];
+    }
     return $this->getResource() ? imagesx($this->getResource()) : NULL;
   }
 
@@ -222,6 +248,9 @@ public function getWidth() {
    * {@inheritdoc}
    */
   public function getHeight() {
+    if (isset($this->preLoadInfo)) {
+      return $this->preLoadInfo[1];
+    }
     return $this->getResource() ? imagesy($this->getResource()) : NULL;
   }
 
diff --git a/core/modules/system/src/Tests/Image/ToolkitTestBase.php b/core/modules/system/src/Tests/Image/ToolkitTestBase.php
index 810dd9f..62358fa 100644
--- a/core/modules/system/src/Tests/Image/ToolkitTestBase.php
+++ b/core/modules/system/src/Tests/Image/ToolkitTestBase.php
@@ -68,7 +68,7 @@ function setUp() {
    */
   protected function getImage() {
     $image = $this->imageFactory->get($this->file, 'test');
-    $this->assertTrue($image->isValid(), 'Image was loaded.');
+    $this->assertTrue($image->isValid(), 'Image file was parsed.');
     return $image;
   }
 
diff --git a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
index 42c8830..dd8560f 100644
--- a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
+++ b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
@@ -76,8 +76,10 @@ public function parseFile() {
       $this->setType($data[2]);
       $this->width = $data[0];
       $this->height = $data[1];
+      $this->getImage()->setValid(TRUE);
       return TRUE;
     }
+    $this->getImage()->setValid(FALSE);
     return FALSE;
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php
index 828a1a1..58a848e 100644
--- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php
+++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php
@@ -64,7 +64,7 @@ protected function setUp() {
    */
   protected function getToolkitMock(array $stubs = array()) {
     $mock_builder = $this->getMockBuilder('Drupal\system\Plugin\ImageToolkit\GDToolkit');
-    $stubs += array('getPluginId', 'save');
+    $stubs = array_merge(array('getPluginId', 'save'), $stubs);
     return $mock_builder
       ->disableOriginalConstructor()
       ->setMethods($stubs)
@@ -92,19 +92,31 @@ protected function getToolkitOperationMock($class_name, ImageToolkitInterface $t
   /**
    * Get an image with a mocked toolkit, for testing.
    *
+   * @param bool $load_expected
+   *   (optional) Whether the load() method is expected to ba called. Defaults
+   *   to TRUE.
    * @param array $stubs
    *   (optional) Array containing toolkit methods to be replaced with stubs.
    *
    * @return \Drupal\Core\Image\Image
    *   An image object.
    */
-  protected function getTestImage(array $stubs = array()) {
+  protected function getTestImage($load_expected = TRUE, array $stubs = array()) {
+    if (!$load_expected && !in_array('load', $stubs)) {
+      $stubs = array_merge(array('load'), $stubs);
+    }
+
     $this->toolkit = $this->getToolkitMock($stubs);
 
     $this->toolkit->expects($this->any())
       ->method('getPluginId')
       ->will($this->returnValue('gd'));
 
+    if (!$load_expected) {
+      $this->toolkit->expects($this->never())
+        ->method('load');
+    }
+
     $this->image = new Image($this->toolkit, $this->source);
   }
 
@@ -118,7 +130,7 @@ protected function getTestImage(array $stubs = array()) {
    *   An image object.
    */
   protected function getTestImageForOperation($class_name) {
-    $this->toolkit = $this->getToolkitMock(array('getToolkitOperation', 'getPluginId'));
+    $this->toolkit = $this->getToolkitMock(array('getToolkitOperation'));
     $this->toolkitOperation = $this->getToolkitOperationMock($class_name, $this->toolkit);
 
     $this->toolkit->expects($this->any())
@@ -136,7 +148,7 @@ protected function getTestImageForOperation($class_name) {
    * Tests \Drupal\Core\Image\Image::getHeight().
    */
   public function testGetHeight() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals(100, $this->image->getHeight());
   }
 
@@ -144,7 +156,7 @@ public function testGetHeight() {
    * Tests \Drupal\Core\Image\Image::getWidth().
    */
   public function testGetWidth() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals(88, $this->image->getWidth());
   }
 
@@ -152,7 +164,7 @@ public function testGetWidth() {
    * Tests \Drupal\Core\Image\Image::getFileSize
    */
   public function testGetFileSize() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals(3905, $this->image->getFileSize());
   }
 
@@ -160,7 +172,7 @@ public function testGetFileSize() {
    * Tests \Drupal\Core\Image\Image::getToolkit()->getType().
    */
   public function testGetType() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals(IMAGETYPE_PNG, $this->image->getToolkit()->getType());
   }
 
@@ -168,7 +180,7 @@ public function testGetType() {
    * Tests \Drupal\Core\Image\Image::getMimeType().
    */
   public function testGetMimeType() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals('image/png', $this->image->getMimeType());
   }
 
@@ -176,7 +188,7 @@ public function testGetMimeType() {
    * Tests \Drupal\Core\Image\Image::isValid().
    */
   public function testIsValid() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertTrue($this->image->isValid());
     $this->assertTrue(is_readable($this->image->getSource()));
   }
@@ -185,7 +197,7 @@ public function testIsValid() {
    * Tests \Drupal\Core\Image\Image::getToolkitId().
    */
   public function testGetToolkitId() {
-    $this->getTestImage();
+    $this->getTestImage(FALSE);
     $this->assertEquals('gd', $this->image->getToolkitId());
   }
 
