作为电子邮件模板发送时图像路径被打乱

Image Path is scrambled when sent as an email template

我创建了一个电子邮件模板,除图片外一切正常。图片 link 总是乱码。我试图搜索此错误并了解到我的服务器图像可能不是 public。所以我将我的图像上传到 google 驱动器,打开图像共享并粘贴 link 作为 src 属性,但它仍然给我损坏的图像。

 <img align="center" alt="Image" border="0" class="center autowidth" src="https://photos.google.com/photo/AF1QipN7nO024WiqXwljlKtjBnAmYibqu-qbON2f-o6V" style="text-decoration: none; -ms-interpolation-mode: bicubic; height: auto; border: none; width: 100%; max-width: 142px; display: block;" title="Image" width="142"/>

这是结果 link 我正在进入 gmail

<img align="center" alt="Image" border="0" src="https://ci5.googleusercontent.com/proxy/2O2l92Xpr3J2mn0fQCZcsCj5_HgubYMC5Yjs126neCu8NpIeGbJhVtx5AgWQDBb1Rzucm9OyHEvAaV1764ZREH3uUB8GovbKgx4k2TrbLLCR9CHNFFTTb5L9wNibIDk=s0-d-e1-ft#https://photos.google.com/photo/AF1QipN7nO024WiqXwljlKtjBnAmYibqu-qbON2f-o6V" style="text-decoration:none;height:auto;border:none;width:100%;max-width:142px;display:block" title="Image" width="142" class="CToWUd">

我该如何解决?

我在这里真正想要的是使用存储在我的 google 驱动器或 google 照片中的图像,而不是使用我自己网站的服务器。这可能吗?

这似乎是由缓存内容的 google 代理服务器引起的。快速搜索发现:

Gmail's new image caching is breaking image links in newsletter

那里提供了适合您的解决方案。

我找到了一种非常简单直接的方法。将您的图片上传到图片托管网站(我使用的是 imgur.com)。您可能需要创建一个帐户,然后上传图片,然后您会找到该图片的直接 link。在您的电子邮件模板中使用 link,问题就解决了。