Magento 2 : how to include custom image in email template?
-
15-04-2021 - |
Question
I have made some email templates, i am not much sure where i can add image files & use it in email templates ?
Is their is possible way to get it ?
Please let me know your thoughts on this.
Thankyou
Solution
You can upload images at the module level or theme level inside the web/images
folder and use the below code inside the email template for getting these images.
<img src="{{view url='Package_Modulename/images/customimg.png'}}" height="100" width="100" alt="{{trans 'Custom image'}}" />
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange