Unable to add product image in oder email Magento 2.3.5

I have tried below 2 solutions:

  1. magento2 - Get product image for invoice email in magento 2.3 - Magento Stack Exchange

  2. magento2 - (Solved) Magento 2, Add product image in all transaction emails(shipment, invoice, credit memo) - Magento Stack Exchange

I am using Claue theme, I pasted the below code in invoice/default.phtml & order/default.phtml, then did a setup:static-content:deploy -f. Created new Order, but I do not see the product image in email only the items as shown in the image below.

PATH:

app/design/frontend/Mgs/claue/Magento_Bundle/templates/email/order/items/order

CODE:

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product_id = $_item->getProductId();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);

$_imagehelper = $objectManager->get('Magento\Catalog\Helper\Image');
$image_url = $_imagehelper->init($product, 'cart_page_product_thumbnail')->getUrl();
?>
<img src="<?php echo $image_url ; ?>" alt="<?php echo $product->getName(); ?>" />

This is what I see in email:

enter image description here

I am using Magento 2.3.5-p1, I am not sure if I am pasting the code in correct block. I pasted it below <tr class="bundle-item bundle-parent"> and above <td class="item-info">.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.