Commit ca2d0ff6 authored by Gaus Surahman's avatar Gaus Surahman Committed by Gaus Surahman
Browse files

Issue #3210759 by gausarts, jlstrecker, aminorking: Generated SVG placeholder...

Issue #3210759 by gausarts, jlstrecker, aminorking: Generated SVG placeholder dimensions are not using the responsive image style dimensions
parent d9d4fa14
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line

Blazy 8.x-2.0-dev, 2022-03-26
-----------------------------
- Issue #3210759 by gausarts, jlstrecker, aminorking: Generated SVG placeholder
  dimensions are not using the responsive image style dimensions.
- Prioritized custom Placeholder ('/blank.svg') to fix for Views rewrite
  results to override Responsive image `data:image` which causes 404.
- Prevents double-downloading the fallback image, enforced since 2.10, to
+7 −0
Original line number Diff line number Diff line
@@ -202,6 +202,13 @@ class BlazyResponsiveImage {
              // @todo use dimensions based on the chosen fallback.
              if ($uri && $style = $blazy->entityLoad($id, 'image_style')) {
                $data_src = BlazyFile::transformRelative($uri, $style);

                [
                  'width' => $width,
                  'height' => $height,
                ] = BlazyImage::transformDimensions($style, $settings);

                $placeholder = Placeholder::generate($width, $height);
              }
            }
          }