Skip to content

Commit

Permalink
Merge pull request #45 from ASUWebPlatforms/WS2-1524
Browse files Browse the repository at this point in the history
WS2-1524: Allows the card component to use the new image style
  • Loading branch information
mlsamuelson authored Mar 14, 2023
2 parents c753f6d + 54b5234 commit 0d7dafe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/ReactComponentHelperFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0d7dafe

Please sign in to comment.