Categories: How ToMagento 2

How to Send Product Images in Order Transaction Mail to Customers in Magento 2

Getting in touch with clients using Email is an inexpensive and widely used form of highly effective business communication compared to others communication channels. Out of the box, Magento comes with built-in functionality to notify customers of each and every order status like order, invoice, shipment and credit memo. Generally, this Email is made up of various details like customer information, ordered products, subtotal and purchase amount, but it doesn’t contain product images that’s why it is difficult to identify the product from the product list. One of our clients suggested us to add functionality of including product thumbnail image to Email, so when there is a bulk order or thousands of products in an Email, it becomes easier for their customers to identify the products they are looking for.

After spending some time to develop such functionality, finally, we came out with a tiny piece of code. Here I am sharing the easiest way to add product images in all transactional Emails sent to customers in Magento 2.

Just paste the following code to default.phtml file available on below path.
app/design/frontend/[theme name]/Magento Sales/templates/email/items/order


And add the image tag like below under the hood of product name.

 

Once you have implemented above code successfully, it will automatically identify and send product image to each & every order transactional mail that are done via Magento 2 environment. Now just clear the cache and you are ready to go.
Let the stars below to shine and if you face any issue while implementing code, I will be glad to help you.
Happy Mailing!

Click to rate this post!
[Total: 15 Average: 3.7]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

View Comments

  • Hello, I want the same thing but it's not working. and I have default luma theme, I do not see /design/frontend[THEME NAME] here, only one empty "Magento" directory exists in 'app/code/design/frontend/[Magento]". and its empty.

    So I am not sure where the luma theme files exist. I added this code in >> vendor/magento/module-sales/*templates*email*item*order/default.phtml" file, but I dont get picture along with the product.

  • Hello Dhiren,
    Having the exact requirment as mentioned in this article but i can not add the code mentioned in default.phtml file.
    I am using Magento version 2.3.3 and not having the path mentioned :
    app/design/frontend/[theme name]/Magento Sales/templates/email/items/order

    Please suggest what to do ?

    • If you have don't have the file on this location, then you can create one and copy the file from magento default extension and then add code there.

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

2 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

5 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

6 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago