diff --git a/oe_theme.theme b/oe_theme.theme index f0d87b404..1ca6153bc 100644 --- a/oe_theme.theme +++ b/oe_theme.theme @@ -2448,7 +2448,7 @@ function oe_theme_preprocess_paragraph__oe_av_media(array &$variables): void { // If it's an image media, render it and assign it to the image variable. if ($source instanceof MediaAvPortalPhotoSource || $source instanceof Image) { $thumbnail = $media->get('thumbnail')->first(); - $variables['image'] = ImageValueObject::fromStyledImageItem($thumbnail, 'oe_theme_medium_no_crop'); + $variables['image'] = ImageValueObject::fromStyledImageItem($thumbnail, 'oe_theme_medium_2x_no_crop'); } } diff --git a/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php b/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php index 5ad6b601f..b02903492 100644 --- a/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php +++ b/tests/src/Kernel/Paragraphs/MediaParagraphsTest.php @@ -1235,6 +1235,7 @@ public function testMediaParagraph(): void { $this->assertCount(1, $crawler->filter('figure.ecl-media-container__figure img.ecl-media-container__media')); $image_element = $crawler->filter('figure.ecl-media-container__figure img.ecl-media-container__media'); $this->assertStringContainsString('example_1_en.jpeg', $image_element->attr('src')); + $this->assertStringContainsString('oe_theme_medium_2x_no_crop', $image_element->attr('src')); // Assert bulgarian rendering. $html = $this->renderParagraph($paragraph, 'bg');