Magento 2 – Images Not Displaying from Custom Email Template on Localhost

email-templatesmagento2product-images

I am getting image in my custom email template but image is not showing in email sent from my localhost. I just need to know why the images are not loading/visible in my email?

Best Answer

It is loaded from the server when the email is opened. My guess is you are sending the email to a Gmail account. When you do that, Google proxies the image to protect your identity by not having your IP hit the Magento server.

Either move the image to a publicly accessible location or setup a staging server to test the whole site on a public server. Since Google can't hit your local server, that image will never load.

Related Topic