HTML image not showing in Gmail
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.
Solution 1:
Late to the party but here goes... I have experienced this problem as well and it was solved with the following:
- Including the scheme in the src url (using "//" does not work - use full scheme EG: "https://")
- Including width and height attributes
- Including style="display:block" attribute
- Including both alt and title attributes
EG:
<img src="https://static.mydomain.com/images/logo.png" alt="Logo" title="Logo" style="display:block" width="200" height="87" />
Solution 2:
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.