diff --git a/app/code/Magento/Catalog/Block/Product/View/Gallery.php b/app/code/Magento/Catalog/Block/Product/View/Gallery.php index 44dd3b9f97cbf..661132457b97e 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/View/Gallery.php @@ -116,7 +116,7 @@ public function getGalleryImagesJson() 'thumb' => $image->getData('small_image_url'), 'img' => $image->getData('medium_image_url'), 'full' => $image->getData('large_image_url'), - 'caption' => $image->getLabel(), + 'caption' => ($image->getLabel() ?: $this->getProduct()->getName()), 'position' => $image->getPosition(), 'isMain' => $this->isMainImage($image), 'type' => str_replace('external-', '', $image->getMediaType()),