Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email not rendering images #36

Open
smilansky opened this issue Oct 8, 2015 · 5 comments
Open

Email not rendering images #36

smilansky opened this issue Oct 8, 2015 · 5 comments

Comments

@smilansky
Copy link

Hey I am attempting to send images and they are not rendering. I put the images in ./public/images/ and tried two methods of rendering them:

  1. The conventional way:
<p><img src="/images/Ecquire-Capturing-Data-from-Professional-Network.png"></p> 

This doesnt serve the image.

  1. I created a template helper that returns Meteor.absoluteUrl.
<p><img src={{absoluteURL("/images/Ecquire-Capturing-Data-from-Professional-Network.png")}}></p> 

This errors with:

Exception in callback of async function: Error: Expected IDENTIFIER
I20151008-12:29:51.393(-7)? ...mg src={{absoluteURL("/images/Ecquire-Cap...

Any ideas? Seems like a simple syntax error. The only other option I can think of is to attach the absolute Image URL with a variable to the template data and then plug that in.

@bsbechtel
Copy link

I'm having the same issue. Did you end up having any luck figuring this out?

@smilansky
Copy link
Author

Yes, you put url of where the image is hosted - <img src="http://[your-url-here]/images/Services.png" style="width:auto; height:auto; max-width:400px; max-height:400px;"></td>

@chrise86
Copy link

So you have to manually specify the url? Is that the only way?

@marcinwal
Copy link

I am having the same problem; maybe you could help me out ? http://stackoverflow.com/questions/36498601/rendering-pictures-in-emails-template-in-meteor

@quangnd
Copy link

quangnd commented Nov 21, 2016

With HTML Email Templates, you MUST USE absolute path for image. So, please upload your image to your hosting and get link to display

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants