Skip to content

Commit

Permalink
Merge pull request #1514 from openeuropa/EWPP-4791
Browse files Browse the repository at this point in the history
EWPP-4791: Fix MediaDataExtractor Thumbnail to return a relative URL of a local file.
  • Loading branch information
22Alexandra authored Oct 9, 2024
2 parents d1f9e79 + 26b982b commit 0b086c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function getThumbnail(MediaInterface $media): ?ImageValueObjectInterface

// Create a new image value object with the new src.
$thumbnail = ImageValueObject::fromArray([
'src' => $image_style->buildUrl($uri),
'src' => \Drupal::service('file_url_generator')->transformRelative($image_style->buildUrl($uri)),
] + $thumbnail->getArray());
$thumbnail->addCacheableDependency($image_style);

Expand Down

0 comments on commit 0b086c3

Please sign in to comment.