Skip to main content

s3 images not showing up in gmail?

Rails • Asked by Jason Ormes
So I'm sending an email using actionmailer which has an image-tag for an image that is stored out in S3.  For some reason gmail doesn't display the image.  it displays images that are coming from the application server. and thunderbird seem to be displaying the S3 images correctly.

Anyone have any thoughts.


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

For example:

<img src="" alt="Logo" title="Logo" style="display:block" width="200" height="87" />

Thank you for the reply, thats what it turned out to be.  Seems gmail doesn't like protocol relative urls.

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.