i am want to show correct product image on my order details page:
I am using it as:
$_item = $block->getItem();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_product = $objectManager->get('Magento\Catalog\Model\Product')->load($_item->getProductId());
$imageHelper = $objectManager->get('\Magento\Catalog\Helper\Image');
$image_url = $imageHelper->init($_product, 'product_page_image_small')->setImageFile($_product->getImage())->resize(100, 100)->getUrl();
but showing main product image its not showing child product image. here i am want to show correct configurable product image.
Please help.
Thanks