Created
September 12, 2018 05:13
-
-
Save azamanaza/3de5d081571bc71ee9bcc521389ad902 to your computer and use it in GitHub Desktop.
Magento2 - Rendering Product Image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
@param \Magento\Catalog\Block\Product\ImageBuilder $imageBuilder | |
@param \Magento\Catalog\Model\Product $product | |
@param string $imageTypeId (product_base_image | product_page_image_medium) | |
$imageHtml = $imageBuilder->setProduct($product) | |
->setImageId($imageId) | |
->create()->toHtml(); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment