Blazy doesn't work with responsive_image in Drupal 8.3 in its current form.

I think we already talked about that while fixing the responsive_image. As far as I can remember it was about, if we should have src or srcset in the fallback image.
Core had srcset before, they say to support older browsers, but they have now switched to using src.
This leads to an error, because we try to get the uri of the srcset, not the src.

The fix is to now just use the src of the fallback image.

CommentFileSizeAuthor
#2 drupal_8_3_error-2849191-2.patch795 bytestjwelde
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tjwelde created an issue. See original summary.

tjwelde’s picture

This patch fixes it, without breaking the old behaviour.

chr.fritsch’s picture

Version: 8.x-1.0-beta5 » 8.x-1.x-dev
Status: Active » Needs review

This patch fixes our bug

gausarts’s picture

Thank you.

+++ b/blazy.module
@@ -41,7 +41,12 @@ function blazy_preprocess_responsive_image(&$variables) {
+    if(isset($variables['img_element']['#srcset'])) {

A tiny nitpick for a space here. Not important, I can add it later.

  • gausarts committed 3126ad1 on 8.x-1.x authored by tjwelde
    - #2849191 by tjwelde, chr.fritsch: Drupal 8.3 error.
    
gausarts’s picture

Category: Bug report » Task
Status: Needs review » Fixed

Let's make anything Deprecated, Recommended, and things broken by core changes as a Task.
Committed. Thank you for contribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.