The following code exists in Magento 1 to get an image in template syntax, is there a way to do this in Magento 2 and load an image from my theme for the email template? I want to add additional images to the footer.

<div sytle="background: {{skin url="images/myimage.png" _area="frontend" _theme="default" _package="mytheme"}}"></div>  
  • 1
    Where is your image exist ? i mean in which directory ? Commented Jul 13, 2017 at 8:16
  • I have the answer, I can write my own answer and accept that, or if you want to provide an answer as an example I can accept that? Commented Jul 13, 2017 at 10:03
  • 1
    Yes can post your own answer and accept that , dats ok Commented Jul 13, 2017 at 11:06

1 Answer 1


Code for accessing an image in a theme web/images folder in Magento 2 email template:

     src="{{view url='images/email/youtube.jpg'}}"
     alt="Website Youtube"
  • I know more than six people have used this, it took me a lot of curiosity when I started using the email template syntax. Commented Mar 24, 2019 at 0:07
  • Where i can find this path: images/email/ Commented Jul 17, 2019 at 13:56
  • I can't remember, but I would guess pub/? Commented Jul 24, 2019 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.