Skip to content

Commit 51deebc

Browse files
AVoskoboinikovduhon
authored andcommitted
MAGETWO-89051: Absorb image optimization from 2.1 into 2.3
1 parent 9a06ead commit 51deebc

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

app/code/Magento/Swatches/Helper/Data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ private function getGalleryImages(ModelProduct $product)
338338
private function getAllSizeImages($imageFile)
339339
{
340340
return [
341-
'large' => $this->imageUrlBuilder->getUrl($imageFile, 'product_page_image_large'),
342-
'medium' => $this->imageUrlBuilder->getUrl($imageFile, 'product_page_image_medium'),
343-
'small' => $this->imageUrlBuilder->getUrl($imageFile, 'product_page_image_small')
341+
'large' => $this->imageUrlBuilder->getUrl($imageFile, 'product_swatch_image_large'),
342+
'medium' => $this->imageUrlBuilder->getUrl($imageFile, 'product_swatch_image_medium'),
343+
'small' => $this->imageUrlBuilder->getUrl($imageFile, 'product_swatch_image_small')
344344
];
345345
}
346346

app/design/frontend/Magento/luma/etc/view.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@
8585
<width>88</width>
8686
<height>110</height>
8787
</image>
88+
<image id="product_swatch_image_large" type="image"/>
89+
<image id="product_swatch_image_medium" type="image">
90+
<width>240</width>
91+
<height>300</height>
92+
</image>
93+
<image id="product_swatch_image_small" type="thumbnail">
94+
<width>88</width>
95+
<height>110</height>
96+
</image>
8897
<image id="product_page_main_image" type="image">
8998
<width>700</width>
9099
<height>560</height>

0 commit comments

Comments
 (0)