Breaking News: Changes to Gmail client
We’ve noticed a couple of email marketing tweets today asking about problems with rendering in Gmail and now, thanks to our friends @ Alchemy Worx, we know what the score is!
Here’s the notice regarding the problem sent out by Alchemy Worx today:
Gmail recently changed the way they interpret the code for displaying images.
Why does this matter?
It matters because it causes unwanted spaces to be added to your email marketing messages potentially breaking the layout of your HTML. Code that used to render perfectly may now render incorrectly.
The change appears to be affecting email marketing messages in Gmail webmail when viewed in Firefox, Opera, Chrome and Safari. However it does not appear to have any effect on HTML emails in Gmail webmail viewed in Internet Explorer.
The solution
This issue is similar to a long-standing Hotmail bug. However, although you can fix this by adding ” img {display:block} ” at the top of your email marketing messages in Hotmail, Gmail ignores this code so that fix will not work.
To ensure your HTML emails render the way they should in Gmail the following needs to be added to every image tag in your email marketing messages: ” <img style=”display:block” src= ”
There is one exception: when you are displaying images directly alongside text, such as when you are wrapping text or putting images inside paragraphs.
Don’t forget your triggered and transactional messages
The change will not just affect new messages you create, it will also affect any triggered or transactional email templates you have already set up.
Once again, we want to thank the folks @ Alchemy Worx for not only alerting the email marketing community to the problem but, finding and offering a fix as well!
Here’s the original notice sent out by Alchemy Worx.
| |
|
|
Other post by this Author
|
|

For those who it didn’t work… are you adding to specifically and ONLY the images that are rendering bad? You shouldn’t make it work on all images.
Thanks for the solution
hi all, we do a lot of QA testing across multiple accounts and browsers and found that adding style=”line-height:1px;” to the TD tag that contains the image fixes this problem.
BUT – it does NOT fix a 1pixel high horizontal TD cell with a background color and a 1pixel high translucent spacer gif.
Thanks for adding this info Ak!
Anytime you want to share your inisght, please drop by!
Regards,
jim
The display:block trick didn’t work for me… (I have images in tables). But adding a font-size and a line-height (low values, like 1 or 2) to the TDs that contain the image, did.
Appreciate the info Francesco!
Regards,
jim
Darrell
You are absolutely correct.
In the case of this fix rendering in Gmail and rendering in Entourage are mutually exclusive. So the choices are build 2 versions or choose to optimize for either Gmail or entourage – all our clients have opted for Gmail.
I guess you must have a lot of Mac users on your list
Good spot by the way
This code ‘fix” absolutely destroys the email when displayed in Entourage. For now we have decided to let the Gmail emails break. It’s the lesser of two evils.
It doesnt work the block code fix that is
Hi Pete,
Let me know if you are still having issues and I can follow up.
Regards,
jim
Thank You for finding a solution!
I just came across that bug this afternoon & it was driving me MAD!
Here is a google thread on the topic:
http://www.google.com/support/forum/p/gmail/thread?tid=66994fa23128e695&hl=en
Hi B,
You just made our day! YW!
Regards,
jim
Do you know when these changes took place?
Hi Joe,
We first saw tweets about the issue yesterday morning and then were notified by Alchemy Worx regarding the issue and posted immediately.
Regards,
jim
nice. Thanks. I’m not sure, but should your code example have a semi-colon before the last quote? Or maybe it doesn’t matter.
like
style=”display:block;”
instead of
style=”display:block”
It doesn’t appear to be required Joe since this is a style attribute for the img tag. I had to put in the extra quotes to ensure that WP wouldn’t remark it out in the post or go completely wonky and possibly launch a random ICBM or some such…
Good catch there…I’ve revised the post to be more clear.
Regards,
jim