Skip to content

Commit b065cd3

Browse files
committed
MAGETWO-53036: [GITHUB] Base image placeholder issue #4549
1 parent 66883d5 commit b065cd3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

app/code/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ public function getGalleryImagesJson()
121121
}
122122
if (empty($imagesItems)) {
123123
$imagesItems[] = [
124-
'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),
125-
'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
126-
'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
124+
'thumb' => $this->getImage($this->getProduct(), 'product_thumbnail_image')->getImageUrl(),
125+
'img' => $this->getImage($this->getProduct(), 'product_base_image')->getImageUrl(),
126+
'full' => $this->getImage($this->getProduct(), 'product_page_image_large')->getImageUrl(),
127127
'caption' => '',
128128
'position' => '0',
129129
'isMain' => true,

app/code/Magento/Catalog/Helper/Image.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,9 @@ public function placeholder($fileName)
433433
*
434434
* @param null|string $placeholder
435435
* @return string
436+
*
437+
* @deprecated Returns only default placeholder.
438+
* Does not take into account custom placeholders set in Configuration.
436439
*/
437440
public function getPlaceholder($placeholder = null)
438441
{
@@ -544,6 +547,9 @@ public function getResizedImageInfo()
544547
/**
545548
* @param null|string $placeholder
546549
* @return string
550+
*
551+
* @deprecated Returns only default placeholder.
552+
* Does not take into account custom placeholders set in Configuration.
547553
*/
548554
public function getDefaultPlaceholderUrl($placeholder = null)
549555
{

0 commit comments

Comments
 (0)