diff --git a/src/Utils/ReactComponentHelperFunctions.php b/src/Utils/ReactComponentHelperFunctions.php index cf59958..9c3ac30 100644 --- a/src/Utils/ReactComponentHelperFunctions.php +++ b/src/Utils/ReactComponentHelperFunctions.php @@ -65,8 +65,8 @@ public function getCardContent($paragraph) { } if (!$image_source) { - // Load default image. - $image_source = \Drupal::service('file_url_generator')->generateAbsoluteString($uri); + $style = ImageStyle::load('image'); + $image_source = $style->buildUrl($uri); } $card->imageSource = $image_source;