Skip to content

Magento 2 Get Thumbnail Image From A Product

Magento 2: How to get a thumbnail image from a product#

This is the simplest wat to get a product image thumbnail

Awaiting the correct way but for now this feels goods

$imagewidth = $imageheight = 250;
$imageUrl = $this->helper('Magento\Catalog\Helper\Image')
->init($currentproduct, 'product_page_image_large')
->setImageFile($currentproduct->getFile())
->getUrl();

Source#