I'm sending an e-mail newsletter in HTML. Inside the HTML I have something like
<img height='70' width='70' style='display:block' src='myDomain.com/imageName.png'>
When I open the newsletter with Thunderbird or Outlook, the image is being displayed. However, when I open it with Gmail, no image is shown. I'm not sure if it's about the proxy that Gmail uses for security reasons or if it's something else. Either way, I'd like to know if anyone ever came across this and if so, how it was solved.
Try to add
title
andalt
properties to your image.... Gmail and some others blocks images without some attributes.. and it is also a logic to include your email to be read as spam.I know Gmail already fix all the problem above, the alt and stuff now.
And this is unrelated to the question but probably someone experiences the same as me.
So my web designer use "image" tag instead of "img", but the symptom was the same. It works on outlook but not Gmail.
It takes me an hour to realize. Sigh, such a waste of time.
So make sure the tag is "img" not "image" as well.
My issue was similar. This is what my experience has been on testing the IMG tag on gmail (assuming most of the organization's would have a dev qa and prod server.)
I had to send emails to customers on their personal email id's and we could see that gmail would add something of its own like following to src attribute of img tag. Now when we were sending these images from our dev environment they would never render on gmail and we were always curious why?
so an image sent to my gmail id as following never worked for me
and our dev server we can't render this image by hitting following URL on Chrome(or any browser).
now as long as the src has www on it worked all the time and we didnt had to add any other attributes.
Google only allows images which are coming from trusted source .
So I solved this issue by hosting my images in google drive and using its url as source for my images.
Example: with: http://drive.google.com/uc?export=view&id=FILEID'>
to form URL please refer here.
In addition to what was said by Howard
You have to keep in mind that Google encodes spaces as
+
To avoid this, the ulr must be encoded in RFC 3986, which means spaces encoded at%20
, for example:Please also check your encoding: Google encodes spaces as
+
instead of%20
. This may result in an invalid image link.