Skip to content

Commit

Permalink
Defaulting missing alt-text for a product to use the product name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Robie committed Oct 10, 2017
1 parent d30f077 commit 836cb30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Product/View/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit 836cb30

Please sign in to comment.