Gmail’s new image proxy feature and quick work-around

As you have probably heard, Gmail has released a new feature called “Image Proxy”. Before digging into Oempro for a work-around, let me explain what this feature is all about.

When you send an HTML email to your recipients, images inside the email are not displayed to them by default. This is almost the same for all email clients and apps. Gmail displays “Show images inside the email” link on the top of the email and until the recipient clicks that link, images are not displayed.

Because email open is also tracked with the help of a transparent image inside the email, email open tracking doesn’t work until that option is clicked.

With the release of Gmail’s Image Proxy feature, Gmail downloads all images inside the email you have sent whenever your email arrives to Gmail servers. Gmail stores them on its own servers and when recipient opens your email, images of your content are served through Gmail’s servers, not from your servers.

Now, this is good and bad. Good because images will be shown to your recipients by default, therefore, they will not see an empty email with a few plain text copy and bordered empty images. Images will be shown (pretty fast) whenever they open the email.

It’s bad because email open tracking will not work anymore. Because tracking image inside the email will be pulled by Gmail before the email is displayed to the recipient. No matter how many recipients open your email, tracking image (as well as other images) will be served from Gmail’s proxy servers.

There’s a way to fix this and avoid Gmail proxy to serve your tracking image. Simply, edit the following file inside your Oempro directory:

[oempro_install_path]/track_open.php

Scroll to the end of this file and comment the following line:

// Core::DisplayTransImage();

Add the following code block after the commented line:

header("Content-type: image/gif");
header("Content-length: 0");
$FileHandler = fopen(TEMPLATE_PATH.'images/trans.gif', "rb");
fpassthru($FileHandler);
fclose($FileHandler);

This should fix the issue, at least until Gmail implements a new procedure to avoid this trick.

Special thanks to Andrew Bonar for his detailed blog post on this topic.

4 thoughts on “Gmail’s new image proxy feature and quick work-around

    1. Well, it seems like getting harder at a first glance, but we believe that this new procedure has several advantages to email marketers. Images are being loaded by default, it’s the best thing that could happen :) Your emails will no longer be displayed with big empty rectangles until recipient clicks “Show images” button which is rarely done.

  1. Nice work explaining the fix to your clients. The only thing I would add… so that Gmail is far less likely to choose to break this. I recommend ensuring you do not violate the HTTP1.1 RFC and do not actually serve an image (data=0), don’t declare an image type and add P3P headers..

    Respects privacy, RFC’s etc.. also going to check out how GA does it.. Keep an eye on the blog for details.

Leave a Reply to Luca Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">