diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module
index 89ac37f..8890dd9 100644
--- a/core/modules/responsive_image/responsive_image.module
+++ b/core/modules/responsive_image/responsive_image.module
@@ -197,17 +197,13 @@ function template_preprocess_responsive_image(&$variables) {
}
else {
$variables['output_image_tag'] = FALSE;
- // Prepare the fallback image. Use srcset in the fallback image to avoid
- // unnecessary preloading of images in older browsers. See
- // http://scottjehl.github.io/picturefill/#using-picture and
- // http://scottjehl.github.io/picturefill/#gotchas for more information.
+ // Prepare the fallback image. We use the src attribute, which might cause
+ // double downloads in browsers that don't support the picture tag (might,
+ // because when picturefill kicks in, it cancels the download and triggers
+ // the download for the correct image).
$variables['img_element'] = array(
'#theme' => 'image',
- '#srcset' => array(
- array(
- 'uri' => _responsive_image_image_style_url($responsive_image_style->getFallbackImageStyle(), $image->getSource()),
- ),
- ),
+ '#uri' => _responsive_image_image_style_url($responsive_image_style->getFallbackImageStyle(), $image->getSource()),
);
}
@@ -265,7 +261,7 @@ function template_preprocess_responsive_image(&$variables) {
*
*
*
- *
+ *
*
* @endcode
*
@@ -294,7 +290,7 @@ function template_preprocess_responsive_image(&$variables) {
*
*
*
- *
+ *
*
* @endcode
* This way a browser can decide which tag is preferred based on the
diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
index f5b277d..aef5ec0 100644
--- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
@@ -315,11 +315,7 @@ protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles =
$fallback_image = array(
'#theme' => 'image',
'#alt' => $alt,
- '#srcset' => array(
- array(
- 'uri' => file_url_transform_relative($large_style->buildUrl($image->getSource())),
- ),
- ),
+ '#uri' => file_url_transform_relative($large_style->buildUrl($image->getSource())),
);
// The image.html.twig template has a newline after the tag but
// responsive-image.html.twig doesn't have one after the fallback image, so