Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is an image generated from google's chart API. image

The url to generate the image is:|day|1:|installs&chxp=0,3|1,6072&chxr=0,0,6|1,0,12145&chxs=0,676767,11.833,0,lt,676767|1,676767,12.833,-0.333,lt,676767&chxt=x,y&chs=400x200&cht=lxy&chds=0,6,0,12145&chd=t:1,2,3,4,5,6|768,2850,6498,10948,12145,0&chdl=installs&chdlp=b&chls=1&chma=5,5,5,1&chtt=installs_per_day

GMail will not (cannot) display this image if it's included in an HTML email.
(e.g. generate and programatically send an email through gmail smtp, or use the gmail labs image insert feature, etc)

Why? Is that a bug? Is there something about encoding URLs for HTML used in emails that I'm missing?

share|improve this question

migrated from Oct 12 '11 at 19:12

This question came from our site for professional and enthusiast programmers.

chtt=installs%20per%20day at the end to have spaces. I couldn't live with the underscores. – Rob Oct 12 '11 at 19:33
I have the exact same problem. Have tried everything. Please notify when you have it solved - I will do the same. Very annoying problem :-| – jriff Oct 18 '11 at 10:06

That is indeed strange. I can confirm the behavior with the Labs feature you mentioned.

I don't know a lot about email encoding but the resulting message seems correct--you can see it in this Gist but doesn't display correctly in Gmail. When I do Inspect Element on the non-image in Gmail it appears that the <img> element has title and alt attributes but no src. Have you tried viewing it in another email client?

It certainly seems like a bug. I'd suggest bringing it up on Gmails' help forums. While GOOG itself isn't particularly responsive there you may find other people who have more insight into this issue.

A workaround that does appear to work, however, is shortening the URL beforehand. I tested it with both TinyURL and and it worked fine, at least when viewed in Gmail (the top message is with the full URL, the bottom is with the URL:


Sorry that's not a complete answer to your question, but I hope it helps.

share|improve this answer
Checking it from OSX's Mail app is fine. – z5h Oct 12 '11 at 19:46
I've submitted a bug report to Google. – z5h Oct 12 '11 at 19:47
Thanks a bunch for reporting it. Can you share a link to the bug? – jriff Oct 18 '11 at 10:06
The reporting site provided no link to track progress. I filed the bug here:… – z5h Oct 18 '11 at 15:07

We had the same issue at WizVille, and think we found why this happens : the charts API returns a URL beginning by "//" which should be interpreted as "http://", but some email clients, like gmail, just don't.

The solution is to specify the protocol, namely "http:", before the chart's URL Google Charts returns. Et voilà !


share|improve this answer
Good solution, but it's incorrect to say that something beginning with // should be interpreted as "http://". WizVille is giving you an invalid URL, it just happens that browsers can figure out how to fix it. – ChrisInEdmonton Oct 23 '13 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .