Image links broken in Gmail because of google's Image proxy
PhpEmailGmailPhp Problem Overview
Image links in gmail are broken because of google's Image proxy (news1,news2). I can't load my site's images in gmail.
Actual image path is: http://sampleimageurl.com/images/logo.jpg
But I get the same image path like this in gmail:
Does anyone knows how to solve this issue?
Php Solutions
Solution 1 - Php
Because your image wasn't open to public.
You need make sure the new Gmail image proxy can fetch your image from google server.
Solution 2 - Php
In Google Apps, it's now possible to disable Image Proxy for GMail (in Apps Settings). Or, better, you can white-list your internal URLs for which image proxying should be disabled.
Solution 3 - Php
DEG’s research has confirmed reports from wordtothewise blogger, Laura Atkins, that “Google is rewriting image links. This rewriting appears to be happening during the delivery process. Older messages that are currently in mailboxes aren’t showing this tracking.”
For global images, this means only one user has to open the mail and the images are pulled from the server. In the case of tracking images, every image file name is unique. Every new open will cause Google to grab the uniquely named image. The result is that senders can track the first open, but no subsequent opens.”
Reference: http://www.degdigital.com/blog/gmail-tracking-disruption-for-marketers/
Solution 4 - Php
Two things that might help:
- Use traditional image formats like .jpg, .png, .gif (formats like svg do not always work)
- Make sure there are no spaces or strange characters in the image path (Check your server request logs. If it gives a 404 to google it is probably a link format issue.)
Solution 5 - Php
I am from Asp.Net world, but I had the same issue.
- Gmail could not cache image while I tested locally
- image's .svg extension was problematic
So, I resolved this issue only by changing the image extension (to .png) and deploying the app to the server (in that case Gmail could access my image for caching and I saw the image in email).
Solution 6 - Php
Change the image's location. In the new Google setup, the first time an image is opened, Google downloads the image and caches it on a Google managed proxy.
Solution 7 - Php
Had similar issue with and it was because I had .htpasswd turned on for my staging site.
Solution 8 - Php
I had the same issue and I solved the problem hosting the images in my public server (http://mydoamin.com/img/images.jpg).
Next step responsive email displaying responsive images: CSS
@media only screen and (max-device-width: 480px) {
td.headercell {
background-image: url(images/[email protected]) !important;
background-size: 325px 115px;
width: 325px !important;
height: 115px !important;
}
td.headercell img {
display: none;
}
}