What is Google Image Proxy?
Google Image Proxy is a Google service that anonymizes image requests for Gmail. Filippo Valsorda has a good write up here of how the service works. The important take away is that this service proxies any requests for image resources that are meant to be displayed in Gmail.
What User-Agent Does Google Image Proxy Send?
Here’s a sample User-Agent (UA) from the service:
Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)
Yes, you read that right. The services replaces any UAs from the original request for the image resource with their own UA.
What Does That Mean?
Since the original User-Agent that made the request for the image resource is no longer available, you do not know who is making the request in the first place. This means that for every request that comes from an end-user who sends or receives your image resource in an email, you will only see Google Image Proxy’s UA and IP address.
How Does Device Detection by WURFL Classify Google Image Proxy?
Previously, we classified the Google Image Proxy as a Robot/Crawler. However, based on updated data, we now know that the requests primarily originate from the Gmail service and are for image resources as intended. Therefore, to improve accuracy, WURFL will begin to classify these requests as an email client/service instead of a robot.
is_robot = true
complete_device_name = Google Image Proxy
form_factor = Robot
is_robot = false
complete_device_name = Google Mail Image Proxy
form_factor = Desktop
mobile_browser = “Email Client”
When Does This Change Happen?
We will change our detection to consider this user-agent as an email client/service and not a robot with the upcoming weekly WURFL.xml data snapshot (November 18, 2018).
What if I want to retain my original behavior?
We understand that you might prefer to retain the previous behavior. If you choose to do so, rest assured that it is only one patch file away. Patch files are an easy way to “patch” the WURFL API’s behavior for single User-Agents and their related capabilities. A good write-up of how to use a patch file is available here.
For example, if you wanted this patch file to override the WURFL API’s behavior and detect this User-Agent as a robot, you’d use something like this:
<?xml version="1.0" encoding="UTF-8"?> <wurfl_patch> <devices> <device id="google_image_proxy" user_agent="DO_NOT_MATCH_GOOGLE_IMAGE_PROXY" fall_back="generic_email_client"> <group id="virtual"> <capability name="controlcap_is_robot" value="true"/> </group> </device> </devices> </wurfl_patch>
This patch forces the is_robot control capability to be set to true and override the default WURFL behavior.