diff --git a/core/modules/comment/src/Tests/CommentPreviewTest.php b/core/modules/comment/src/Tests/CommentPreviewTest.php
index 25f3d7b..2a9b197 100644
--- a/core/modules/comment/src/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/src/Tests/CommentPreviewTest.php
@@ -59,7 +59,7 @@ function testCommentPreview() {
     $this->assertRaw('<em>' . $this->webUser->id() . '</em>');
 
     // Add a user picture.
-    $image = $this->drupalGetTestImageFile();
+    $image = current($this->drupalGetTestFiles('image'));
     $user_edit['files[user_picture_0]'] = drupal_realpath($image->uri);
     $this->drupalPostForm('user/' . $this->webUser->id() . '/edit', $user_edit, t('Save'));
 
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 8fe95de..26c35ac 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -391,7 +391,7 @@ function file_validate_is_image(FileInterface $file) {
   $image = $image_factory->get($file->getFileUri());
   if (!$image->isValid()) {
     $supported_extensions = $image_factory->getSupportedExtensions();
-    $errors[] = t('The image is invalid, or not supported. Allowed types: %types', array('%types' => implode(' ', $supported_extensions)));
+    $errors[] = t('Image type not supported. Allowed types: %types', array('%types' => implode(' ', $supported_extensions)));
   }
 
   return $errors;
diff --git a/core/modules/file/src/Tests/SaveUploadTest.php b/core/modules/file/src/Tests/SaveUploadTest.php
index 7eda38b..7c3bd4c 100644
--- a/core/modules/file/src/Tests/SaveUploadTest.php
+++ b/core/modules/file/src/Tests/SaveUploadTest.php
@@ -51,7 +51,8 @@ protected function setUp() {
     $account = $this->drupalCreateUser(array('access site reports'));
     $this->drupalLogin($account);
 
-    $this->image = entity_create('file', (array) $this->drupalGetTestImageFile());
+    $image_files = $this->drupalGetTestFiles('image');
+    $this->image = entity_create('file', (array) current($image_files));
 
     list(, $this->imageExtension) = explode('.', $this->image->getFilename());
     $this->assertTrue(is_file($this->image->getFileUri()), "The image file we're going to upload exists.");
@@ -91,7 +92,7 @@ function testNormal() {
     file_test_reset();
 
     // Upload a second file.
-    $image2 = $this->drupalGetTestImageFile();
+    $image2 = current($this->drupalGetTestFiles('image'));
     $edit = array('files[file_test_upload]' => drupal_realpath($image2->uri));
     $this->drupalPostForm('file-test/upload', $edit, t('Submit'));
     $this->assertResponse(200, 'Received a 200 response for posted test file.');
@@ -112,7 +113,7 @@ function testNormal() {
     $this->assertTrue(isset($files[$file2->id()]), 'File was loaded successfully');
 
     // Upload a third file to a subdirectory.
-    $image3 = $this->drupalGetTestImageFile();
+    $image3 = current($this->drupalGetTestFiles('image'));
     $image3_realpath = drupal_realpath($image3->uri);
     $dir = $this->randomMachineName();
     $edit = array(
diff --git a/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php b/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php
index 915e58e..9d96c5f 100644
--- a/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php
+++ b/core/modules/filter/src/Tests/FilterHtmlImageSecureTest.php
@@ -94,14 +94,14 @@ function testImageSource() {
     $title_text = t('This image has been removed. For security reasons, only images from the local domain are allowed.');
 
     // Put a test image in the files directory.
-    $image_file = $this->drupalGetTestImageFile();
-    $test_image = $image_file->filename;
+    $test_images = $this->drupalGetTestFiles('image');
+    $test_image = $test_images[0]->filename;
 
     // Put a test image in the files directory with special filename.
     $special_filename = 'tést fïle nàme.png';
     $special_image = rawurlencode($special_filename);
-    $special_uri = str_replace($image_file->filename, $special_filename, $image_file->uri);
-    file_unmanaged_copy($image_file->uri, $special_uri);
+    $special_uri = str_replace($test_images[0]->filename, $special_filename, $test_images[0]->uri);
+    file_unmanaged_copy($test_images[0]->uri, $special_uri);
 
     // Create a list of test image sources.
     // The keys become the value of the IMG 'src' attribute, the values are the
diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
index f872028..82092e6 100644
--- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
+++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
@@ -116,9 +116,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
 
     $field_settings = $this->getFieldSettings();
 
-    // Add image validation.
-    $element['#upload_validators']['file_validate_is_image'] = array();
-
     // Add upload resolution validation.
     if ($field_settings['max_resolution'] || $field_settings['min_resolution']) {
       $element['#upload_validators']['file_validate_image_resolution'] = array($field_settings['max_resolution'], $field_settings['min_resolution']);
diff --git a/core/modules/image/src/Tests/FileMoveTest.php b/core/modules/image/src/Tests/FileMoveTest.php
index 8d457e8..34c54a7 100644
--- a/core/modules/image/src/Tests/FileMoveTest.php
+++ b/core/modules/image/src/Tests/FileMoveTest.php
@@ -29,7 +29,7 @@ class FileMoveTest extends WebTestBase {
    */
   function testNormal() {
     // Pick a file for testing.
-    $file = entity_create('file', (array) $this->drupalGetTestImageFile());
+    $file = entity_create('file', (array) current($this->drupalGetTestFiles('image')));
 
     // Create derivative image.
     $styles = ImageStyle::loadMultiple();
diff --git a/core/modules/image/src/Tests/ImageAdminStylesTest.php b/core/modules/image/src/Tests/ImageAdminStylesTest.php
index ce2a5f5..ed3854f 100644
--- a/core/modules/image/src/Tests/ImageAdminStylesTest.php
+++ b/core/modules/image/src/Tests/ImageAdminStylesTest.php
@@ -29,7 +29,8 @@ function createSampleImage(ImageStyleInterface $style) {
     // First, we need to make sure we have an image in our testing
     // file directory. Copy over an image on the first run.
     if (!isset($file_path)) {
-      $file = $this->drupalGetTestImageFile();
+      $files = $this->drupalGetTestFiles('image');
+      $file = reset($files);
       $file_path = file_unmanaged_copy($file->uri);
     }
 
@@ -296,7 +297,7 @@ function testStyleReplacement() {
       ->save();
 
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
     $nid = $this->uploadNodeImage($test_image, $field_name, 'article', $this->randomMachineName());
     $node = Node::load($nid);
 
@@ -390,8 +391,8 @@ public function testFlushUserInterface() {
     $style->save();
 
     // Create an image to make sure it gets flushed.
-    $image_file = $this->drupalGetTestImageFile();
-    $image_uri = $image_file->uri;
+    $files = $this->drupalGetTestFiles('image');
+    $image_uri = $files[0]->uri;
     $derivative_uri = $style->buildUri($image_uri);
     $this->assertTrue($style->createDerivative($image_uri, $derivative_uri));
     $this->assertEqual($this->getImageCount($style), 1);
@@ -430,7 +431,7 @@ function testConfigImport() {
       ->save();
 
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
     $nid = $this->uploadNodeImage($test_image, $field_name, 'article', $this->randomMachineName());
     $node = Node::load($nid);
 
diff --git a/core/modules/image/src/Tests/ImageDimensionsTest.php b/core/modules/image/src/Tests/ImageDimensionsTest.php
index 5621f52..c7a738d 100644
--- a/core/modules/image/src/Tests/ImageDimensionsTest.php
+++ b/core/modules/image/src/Tests/ImageDimensionsTest.php
@@ -32,7 +32,8 @@ class ImageDimensionsTest extends WebTestBase {
   function testImageDimensions() {
     $image_factory = $this->container->get('image.factory');
     // Create a working copy of the file.
-    $file = $this->drupalGetTestImageFile('image-test.png');
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
     $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
 
     // Create a style.
@@ -260,7 +261,7 @@ function testImageDimensions() {
     $this->assertEqual($image_file->getWidth(), 100);
     $this->assertEqual($image_file->getHeight(), 100);
     // GIF original image. Should be resized to 50x50.
-    $file = $this->drupalGetTestImageFile('image-test.gif');
+    $file = $files[1];
     $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
     $generated_uri = 'public://styles/test_uri/public/'. \Drupal::service('file_system')->basename($original_uri);
     $url = $style->buildUrl($original_uri);
diff --git a/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php b/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php
index a87ba3c..e541c27 100644
--- a/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php
+++ b/core/modules/image/src/Tests/ImageFieldDefaultImagesTest.php
@@ -28,22 +28,19 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase {
    */
   public function testDefaultImages() {
     $node_storage = $this->container->get('entity.manager')->getStorage('node');
-
-    // Create 10 file entities so the default image fids are not a single
-    // value.
+    // Create files to use as the default images.
+    $files = $this->drupalGetTestFiles('image');
+    // Create 10 files so the default image fids are not a single value.
     for ($i = 1; $i <= 10; $i++) {
       $filename = $this->randomMachineName() . "$i";
       $desired_filepath = 'public://' . $filename;
-      file_unmanaged_copy($this->drupalGetTestImageFile()->uri, $desired_filepath, FILE_EXISTS_ERROR);
+      file_unmanaged_copy($files[0]->uri, $desired_filepath, FILE_EXISTS_ERROR);
       $file = entity_create('file', array('uri' => $desired_filepath, 'filename' => $filename, 'name' => $filename));
       $file->save();
     }
-
-    // Create file entities to use as the default images.
-    $files = ['image-1.png', 'image-test.jpg', 'image-2.jpg', 'image-test-no-transparency.gif', 'image-test-transparent-out-of-range.gif'];
     $default_images = array();
     foreach (array('field', 'field', 'field2', 'field_new', 'field_new') as $image_target) {
-      $file = entity_create('file', (array) $this->drupalGetTestImageFile(array_shift($files)));
+      $file = entity_create('file', (array) array_pop($files));
       $file->save();
       $default_images[$image_target] = $file;
     }
diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
index 516a453..c4cf485 100644
--- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
@@ -77,7 +77,7 @@ function _testImageFieldFormatters($scheme) {
     user_role_change_permissions(reset($admin_user_roles), array('administer image styles' => TRUE));
 
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
 
     // Ensure that preview works.
     $this->previewNodeImage($test_image, $field_name, 'article');
@@ -211,7 +211,7 @@ function testImageFieldSettings() {
     /** @var \Drupal\Core\Render\RendererInterface $renderer */
     $renderer = $this->container->get('renderer');
     $node_storage = $this->container->get('entity.manager')->getStorage('node');
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
     list(, $test_image_extension) = explode('.', $test_image->filename);
     $field_name = strtolower($this->randomMachineName());
     $field_settings = array(
@@ -342,11 +342,11 @@ function testImageFieldDefaultImage() {
     $this->assertTrue(!preg_match('/ image_style\:/', $cache_tags_header), 'No image style cache tag found.');
 
     // Add a default image to the public image field.
-    $image = $this->drupalGetTestImageFile('image-test.png');
+    $images = $this->drupalGetTestFiles('image');
     $alt = $this->randomString(512);
     $title = $this->randomString(1024);
     $edit = array(
-      'files[settings_default_image_uuid]' => drupal_realpath($image->uri),
+      'files[settings_default_image_uuid]' => drupal_realpath($images[0]->uri),
       'settings[default_image][alt]' => $alt,
       'settings[default_image][title]' => $title,
     );
@@ -378,8 +378,7 @@ function testImageFieldDefaultImage() {
     // Create alt text for the image.
     $alt = $this->randomMachineName();
 
-    $image_file = $this->drupalGetTestImageFile('image-test.jpg');
-    $nid = $this->uploadNodeImage($image_file, $field_name, 'article', $alt);
+    $nid = $this->uploadNodeImage($images[1], $field_name, 'article', $alt);
     $node_storage->resetCache(array($nid));
     $node = $node_storage->load($nid);
     $file = $node->{$field_name}->entity;
@@ -414,7 +413,7 @@ function testImageFieldDefaultImage() {
     $this->createImageField($private_field_name, 'article', array('uri_scheme' => 'private'));
     // Add a default image to the new field.
     $edit = array(
-      'files[settings_default_image_uuid]' => drupal_realpath($image_file->uri),
+      'files[settings_default_image_uuid]' => drupal_realpath($images[1]->uri),
       'settings[default_image][alt]' => $alt,
       'settings[default_image][title]' => $title,
     );
diff --git a/core/modules/image/src/Tests/ImageFieldValidateTest.php b/core/modules/image/src/Tests/ImageFieldValidateTest.php
index 772e6cc..3fee09c 100644
--- a/core/modules/image/src/Tests/ImageFieldValidateTest.php
+++ b/core/modules/image/src/Tests/ImageFieldValidateTest.php
@@ -14,40 +14,6 @@
  */
 class ImageFieldValidateTest extends ImageFieldTestBase {
   /**
-   * Test image validity.
-   */
-  function testValid() {
-    $field_name = strtolower($this->randomMachineName());
-    $this->createImageField($field_name, 'article', array(), array());
-
-    // Create alt text for the image.
-    $alt = $this->randomMachineName();
-
-    // Create a node with a valid image.
-    $node = $this->uploadNodeImage($this->drupalGetTestImageFile('image-1.png'), $field_name, 'article', $alt);
-
-    // Remove the image.
-    $this->drupalPostForm('node/' . $node . '/edit', array(), t('Remove'));
-    $this->drupalPostForm(NULL, array(), t('Save and keep published'));
-
-    // Try uploading a zero-byte image.
-    $zero_size_image = $this->drupalGetTestImageFile('image-zero-size.png');
-    $edit = array(
-      'files[' . $field_name . '_0]' => drupal_realpath($zero_size_image->uri),
-    );
-    $this->drupalPostForm('node/' . $node . '/edit', $edit, t('Upload'));
-    $this->assertFalse(file_exists('public://image-zero-size_0.png'), 'Zero-byte image file was not loaded.');
-
-    // Try uploading an invalid image.
-    $invalid_image = $this->drupalGetTestImageFile('image-invalid.png');
-    $edit = array(
-      'files[' . $field_name . '_0]' => drupal_realpath($invalid_image->uri),
-    );
-    $this->drupalPostForm('node/' . $node . '/edit', $edit, t('Upload'));
-    $this->assertFalse(file_exists('public://image-invalid_0.png'), 'Invalid image file was not loaded.');
-  }
-
-  /**
    * Test min/max resolution settings.
    */
   function testResolution() {
@@ -62,12 +28,25 @@ function testResolution() {
     $this->createImageField($field_name, 'article', array(), $field_settings);
 
     // We want a test image that is too small, and a test image that is too
-    // big.
-    $image_that_is_too_small = $this->drupalGetTestImageFile('image-test.jpg');
+    // big, so cycle through test image files until we have what we need.
+    $image_that_is_too_big = FALSE;
+    $image_that_is_too_small = FALSE;
+    $image_factory = $this->container->get('image.factory');
+    foreach ($this->drupalGetTestFiles('image') as $image) {
+      $image_file = $image_factory->get($image->uri);
+      if ($image_file->getWidth() > $max_resolution) {
+        $image_that_is_too_big = $image;
+      }
+      if ($image_file->getWidth() < $min_resolution) {
+        $image_that_is_too_small = $image;
+      }
+      if ($image_that_is_too_small && $image_that_is_too_big) {
+        break;
+      }
+    }
     $this->uploadNodeImage($image_that_is_too_small, $field_name, 'article');
     $this->assertRaw(t('The specified file %name could not be uploaded.', array('%name' => $image_that_is_too_small->filename)));
     $this->assertRaw(t('The image is too small; the minimum dimensions are %dimensions pixels.', array('%dimensions' => '50x50')));
-    $image_that_is_too_big = $this->drupalGetTestImageFile('image-1.png');
     $this->uploadNodeImage($image_that_is_too_big, $field_name, 'article');
     $this->assertText(t('The image was resized to fit within the maximum allowed dimensions of 100x100 pixels.'));
   }
@@ -85,8 +64,9 @@ function testRequiredAttributes() {
       'required' => 1,
     );
     $instance = $this->createImageField($field_name, 'article', array(), $field_settings);
-    // Make sure we use a valid image.
-    $image = $this->drupalGetTestImageFile();
+    $images = $this->drupalGetTestFiles('image');
+    // Let's just use the first image.
+    $image = $images[0];
     $this->uploadNodeImage($image, $field_name, 'article');
 
     // Look for form-required for the alt text.
diff --git a/core/modules/image/src/Tests/ImageStyleFlushTest.php b/core/modules/image/src/Tests/ImageStyleFlushTest.php
index e092f61..0a6a5fa 100644
--- a/core/modules/image/src/Tests/ImageStyleFlushTest.php
+++ b/core/modules/image/src/Tests/ImageStyleFlushTest.php
@@ -23,7 +23,8 @@ function createSampleImage($style, $wrapper) {
     static $file;
 
     if (!isset($file)) {
-      $file = $this->drupalGetTestImageFile();
+      $files = $this->drupalGetTestFiles('image');
+      $file = reset($files);
     }
 
     // Make sure we have an image in our wrapper testing file directory.
diff --git a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
index fae54b8..81c1628 100644
--- a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
@@ -110,7 +110,8 @@ function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash =
     $this->assertNotIdentical(FALSE, $status, 'Created the directory for the generated images for the test style.');
 
     // Create a working copy of the file.
-    $file = $this->drupalGetTestImageFile('image-test.png');
+    $files = $this->drupalGetTestFiles('image');
+    $file = array_shift($files);
     $original_uri = file_unmanaged_copy($file->uri, $scheme . '://', FILE_EXISTS_RENAME);
     // Let the image_module_test module know about this file, so it can claim
     // ownership in hook_file_download().
@@ -176,7 +177,7 @@ function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash =
 
       // Repeat this with a different file that we do not have access to and
       // make sure that access is denied.
-      $file_noaccess = $this->drupalGetTestImageFile('image-test.jpg');
+      $file_noaccess = array_shift($files);
       $original_uri_noaccess = file_unmanaged_copy($file_noaccess->uri, $scheme . '://', FILE_EXISTS_RENAME);
       $generated_uri_noaccess = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/'. drupal_basename($original_uri_noaccess);
       $this->assertFalse(file_exists($generated_uri_noaccess), 'Generated file does not exist.');
@@ -210,7 +211,8 @@ function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash =
     $this->config('image.settings')->set('allow_insecure_derivatives', TRUE)->save();
 
     // Create another working copy of the file.
-    $file = $this->drupalGetTestImageFile('image-test.png');
+    $files = $this->drupalGetTestFiles('image');
+    $file = array_shift($files);
     $original_uri = file_unmanaged_copy($file->uri, $scheme . '://', FILE_EXISTS_RENAME);
     // Let the image_module_test module know about this file, so it can claim
     // ownership in hook_file_download().
diff --git a/core/modules/image/src/Tests/ImageThemeFunctionTest.php b/core/modules/image/src/Tests/ImageThemeFunctionTest.php
index 6d73e4f..54b471b 100644
--- a/core/modules/image/src/Tests/ImageThemeFunctionTest.php
+++ b/core/modules/image/src/Tests/ImageThemeFunctionTest.php
@@ -67,7 +67,8 @@ function testImageFormatterTheme() {
     $renderer = $this->container->get('renderer');
 
     // Create an image.
-    $file = $this->drupalGetTestImageFile();
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
     $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
 
     // Create a style.
@@ -128,7 +129,8 @@ function testImageStyleTheme() {
     $renderer = $this->container->get('renderer');
 
     // Create an image.
-    $file = $this->drupalGetTestImageFile();
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
     $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
 
     // Create a style.
diff --git a/core/modules/node/src/Tests/PagePreviewTest.php b/core/modules/node/src/Tests/PagePreviewTest.php
index 33101c8..903636a 100644
--- a/core/modules/node/src/Tests/PagePreviewTest.php
+++ b/core/modules/node/src/Tests/PagePreviewTest.php
@@ -144,7 +144,7 @@ function testPagePreview() {
     $edit[$term_key] = $this->term->getName();
 
     // Upload an image.
-    $test_image = $this->drupalGetTestImageFile('image-1.png');
+    $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'));
 
diff --git a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
index 8392e38..4816c04 100644
--- a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
+++ b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php
@@ -547,7 +547,7 @@ public function testImageField() {
 
     // Add an image to the node.
     $this->drupalLogin($this->editorUser);
-    $image = $this->drupalGetTestImageFile();
+    $image = $this->drupalGetTestFiles('image')[0];
     $this->drupalPostForm('node/1/edit', [
       'files[field_image_0]' => $image->uri,
     ], t('Upload'));
diff --git a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php b/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
index 69d15c4..a36a0a8 100644
--- a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
+++ b/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
@@ -65,7 +65,7 @@ protected function setUp() {
       ->save();
 
     // Get the test image that simpletest provides.
-    $image = $this->drupalGetTestImageFile();
+    $image = current($this->drupalGetTestFiles('image'));
 
     // Save a node with the image.
     $nid = $this->uploadNodeImage($image, $this->fieldName, 'article', $this->randomMachineName());
diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
index 1075d06..b42831b 100644
--- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
@@ -174,9 +174,9 @@ protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles =
     $node_storage = $this->container->get('entity.manager')->getStorage('node');
     $field_name = Unicode::strtolower($this->randomMachineName());
     $this->createImageField($field_name, 'article', array('uri_scheme' => $scheme));
-    // Create a new node with an image attached. We use a large image so the
-    // scale effects of the image styles always have an effect.
-    $test_image = $this->drupalGetTestImageFile('image-1.png');
+    // Create a new node with an image attached. Make sure we use a large image
+    // so the scale effects of the image styles always have an effect.
+    $test_image = current($this->drupalGetTestFiles('image', 39325));
 
     // Create alt text for the image.
     $alt = $this->randomMachineName();
@@ -377,7 +377,7 @@ public function testResponsiveImageFieldFormattersEmptyMediaQuery() {
     $field_name = Unicode::strtolower($this->randomMachineName());
     $this->createImageField($field_name, 'article', array('uri_scheme' => 'public'));
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
     $nid = $this->uploadNodeImage($test_image, $field_name, 'article', $this->randomMachineName());
     $node_storage->resetCache(array($nid));
 
@@ -425,7 +425,7 @@ public function testResponsiveImageFieldFormattersOneSource() {
     $field_name = Unicode::strtolower($this->randomMachineName());
     $this->createImageField($field_name, 'article', array('uri_scheme' => 'public'));
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
     $nid = $this->uploadNodeImage($test_image, $field_name, 'article', $this->randomMachineName());
     $node_storage->resetCache(array($nid));
 
@@ -463,7 +463,7 @@ private function assertResponsiveImageFieldFormattersLink($link_type) {
     $field_settings = array('alt_field_required' => 0);
     $this->createImageField($field_name, 'article', array('uri_scheme' => 'public'), $field_settings);
     // Create a new node with an image attached.
-    $test_image = $this->drupalGetTestImageFile();
+    $test_image = current($this->drupalGetTestFiles('image'));
 
     // Test the image linked to file formatter.
     $display_options = array(
diff --git a/core/modules/simpletest/files/image-invalid.png b/core/modules/simpletest/files/image-invalid.png
deleted file mode 100644
index 8175b44..0000000
--- a/core/modules/simpletest/files/image-invalid.png
+++ /dev/null
@@ -1 +0,0 @@
-invalid image file
diff --git a/core/modules/simpletest/files/image-zero-size.png b/core/modules/simpletest/files/image-zero-size.png
deleted file mode 100644
index e69de29..0000000
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 4c5b24f..2edfc81 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -556,25 +556,6 @@ protected function drupalGetTestFiles($type, $size = NULL) {
   }
 
   /**
-   * Gets an image file that can be used in tests.
-   *
-   * @param string|null $file_name
-   *   (Optional) The file name of the file to be returned. If not specified,
-   *   will return a valid image file from the image files.
-   *
-   * @return stdClass|null
-   *   A file object, or NULL if requested file is not existing.
-   */
-  protected function drupalGetTestImageFile($file_name = NULL) {
-    $image_files = array();
-    foreach ($this->drupalGetTestFiles('image') as $file) {
-      $image_files[$file->filename] = $file;
-    }
-    $file_name = $file_name ?: 'image-test.png';
-    return isset($image_files[$file_name]) ? $image_files[$file_name] : NULL;
-  }
-
-  /**
    * Compare two files based on size and file name.
    */
   protected function drupalCompareFiles($file1, $file2) {
diff --git a/core/modules/system/src/Tests/Form/StateValuesCleanAdvancedTest.php b/core/modules/system/src/Tests/Form/StateValuesCleanAdvancedTest.php
index 06c2148..bfdc64c 100644
--- a/core/modules/system/src/Tests/Form/StateValuesCleanAdvancedTest.php
+++ b/core/modules/system/src/Tests/Form/StateValuesCleanAdvancedTest.php
@@ -36,7 +36,8 @@ class StateValuesCleanAdvancedTest extends WebTestBase {
   function testFormStateValuesCleanAdvanced() {
 
     // Get an image for uploading.
-    $this->image = $this->drupalGetTestImageFile();
+    $image_files = $this->drupalGetTestFiles('image');
+    $this->image = current($image_files);
 
     // Check if the physical file is there.
     $this->assertTrue(is_file($this->image->uri), "The image file we're going to upload exists.");
diff --git a/core/modules/system/src/Tests/Image/ToolkitTestBase.php b/core/modules/system/src/Tests/Image/ToolkitTestBase.php
index 6bac25e..21a514c 100644
--- a/core/modules/system/src/Tests/Image/ToolkitTestBase.php
+++ b/core/modules/system/src/Tests/Image/ToolkitTestBase.php
@@ -50,7 +50,7 @@ protected function setUp() {
     $this->imageFactory = $this->container->get('image.factory');
 
     // Pick a file for testing.
-    $file = $this->drupalGetTestImageFile();
+    $file = current($this->drupalGetTestFiles('image'));
     $this->file = $file->uri;
 
     // Setup a dummy image to work with.
diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php
index ac5b7c6..278353d 100644
--- a/core/modules/system/src/Tests/System/ThemeTest.php
+++ b/core/modules/system/src/Tests/System/ThemeTest.php
@@ -57,7 +57,7 @@ function testThemeSettings() {
     $this->assertResponse(404, 'The theme settings form URL for a hidden theme is unavailable.');
 
     // Specify a filesystem path to be used for the logo.
-    $file = $this->drupalGetTestImageFile();
+    $file = current($this->drupalGetTestFiles('image'));
     $file_relative = strtr($file->uri, array('public:/' => PublicStream::basePath()));
     $default_theme_path = 'core/themes/classy';
 
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
index f7589f3..550c5f5 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
@@ -74,7 +74,8 @@ public function testTaxonomyImageAccess() {
     $this->drupalLogin($user);
 
     // Create a term and upload the image.
-    $image = $this->drupalGetTestImageFile();
+    $files = $this->drupalGetTestFiles('image');
+    $image = array_pop($files);
     $edit['name[0][value]'] = $this->randomMachineName();
     $edit['files[field_test_0]'] = drupal_realpath($image->uri);
     $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->id()  . '/add', $edit, t('Save'));
diff --git a/core/modules/update/src/Tests/UpdateUploadTest.php b/core/modules/update/src/Tests/UpdateUploadTest.php
index 806936f..f319448 100644
--- a/core/modules/update/src/Tests/UpdateUploadTest.php
+++ b/core/modules/update/src/Tests/UpdateUploadTest.php
@@ -35,8 +35,12 @@ protected function setUp() {
    * Tests upload, extraction, and update of a module.
    */
   public function testUploadModule() {
-    // Images are not valid archives, so get one and try to install it.
-    $invalidArchiveFile = $this->drupalGetTestImageFile();
+    // Images are not valid archives, so get one and try to install it. We
+    // need an extra variable to store the result of drupalGetTestFiles()
+    // since reset() takes an argument by reference and passing in a constant
+    // emits a notice in strict mode.
+    $imageTestFiles = $this->drupalGetTestFiles('image');
+    $invalidArchiveFile = reset($imageTestFiles);
     $edit = array(
       'files[project_upload]' => $invalidArchiveFile->uri,
     );
diff --git a/core/modules/user/src/Tests/UserPasswordResetTest.php b/core/modules/user/src/Tests/UserPasswordResetTest.php
index 70b3f04..420b97a 100644
--- a/core/modules/user/src/Tests/UserPasswordResetTest.php
+++ b/core/modules/user/src/Tests/UserPasswordResetTest.php
@@ -111,7 +111,7 @@ function testUserPasswordReset() {
 
     // Make sure the ajax request from uploading a user picture does not
     // invalidate the reset token.
-    $image = $this->drupalGetTestImageFile();
+    $image = current($this->drupalGetTestFiles('image'));
     $edit = array(
       'files[user_picture_0]' => drupal_realpath($image->uri),
     );
diff --git a/core/modules/user/src/Tests/UserPictureTest.php b/core/modules/user/src/Tests/UserPictureTest.php
index 457158e..bd28934 100644
--- a/core/modules/user/src/Tests/UserPictureTest.php
+++ b/core/modules/user/src/Tests/UserPictureTest.php
@@ -53,7 +53,7 @@ function testCreateDeletePicture() {
     $this->drupalLogin($this->webUser);
 
     // Save a new picture.
-    $image = $this->drupalGetTestImageFile();
+    $image = current($this->drupalGetTestFiles('image'));
     $file = $this->saveUserPicture($image);
 
     // Verify that the image is displayed on the user account page.
@@ -90,7 +90,7 @@ function testPictureOnNodeComment() {
     $this->drupalLogin($this->webUser);
 
     // Save a new picture.
-    $image = $this->drupalGetTestImageFile();
+    $image = current($this->drupalGetTestFiles('image'));
     $file = $this->saveUserPicture($image);
 
     $node = $this->drupalCreateNode(array('type' => 'article'));
