SVG图像被Gmail代理阻止
似乎新的Gmail代理用于图像不适用于SVG(如果您在新选项卡中打开代理URL,则会出现404错误。)
我找不到有关支持/阻止文件类型的任何文档。 gmail中的SVG是否为其他人工作?
我能想到的唯一解决方法是使用 phantomjs在服务器上生成SVG的PNG - 任何其他选项吗?
背景:
这是针对发送每日摘要电子邮件的WebApp,显示了最后24小时的图表(因此SVG每天不同该应用程序。)
我知道SVG映像在某些电子邮件传输量中无法正常工作,但是它的工作方式为95%,其余的仍然可以单击到WebApp。
它在Gmail中运行良好,直到本月早些时候代理更改为止(该月底才向Google Apps帐户推出。)
It seems like the new gmail proxy for images doesn't work with SVG (gives a 404 error if you open the proxy url in a new tab.)
I haven't been able to find any documentation about supported/blocked file-types. Is SVG in gmail working for anyone else?
The only workaround I can think of is to generate a png of the svg on the server using PhantomJS - any other options?
Background:
This is for a webapp that sends daily summary emails, showing a graph covering the last 24 hours (so the svg is different each day, having it in the email saves the user the hassle of clicking through to the app.)
I know that the SVG images won't work in some email-clients, but it'll work for 95%, the rest can still click through to the webapp.
It was working fine in gmail up until the proxy change earlier this month (which has only just rolled out to Google Apps accounts at the end of the month.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从Google支持中回来了,他们已经确认目前尚无计划支持代理中的SVG图像。他们说,他们仅占100,000封电子邮件图像中的1个。
除了phantomjs之外,PHP插件ImageMagick是更简单的SVG选项。
以下是一些示例代码可以使您入门:
您需要至少安装以下一些:
I've heard back from Google support, and they've confirmed there are currently no plans to support SVG images in the proxy. They said they account for only 1 in 100,000 email images.
Apart from PhantomJs, an option for simpler svg is the php plugin ImageMagick.
Here's some sample code to get you started:
You'll want to install at least some of the following:
直到今天(2024年9月),这仍然是Gmail的问题。
(数据; base64图像也包括一个问题)
Windows的Outlook是旧的“ MS Word” HTML渲染的问题。
这很可能在将来发生变化 - 1 - 2年
Windows的“新Outlook”正在2024年推出,以O365中的拨动开关。
(可能在2026年删除旧体验)
在Mac的Outlook(O365)中,这在2023年发生了变化。Outlook
Mail最终支持SVG实际上可能会增加Gmail的压力以解决它。
this is still an issue on gmail to this day (September 2024).
(data;base64 image includes are an issue as well)
Outlook for Windows has been an issue with the old "MS Word" html render.
This will most likely change in the future -- 1-2 years
the "New Outlook" for Windows is rolling out in 2024 as toggle switch in O365.
(the old experience might be removed in 2026)
In Outlook for Mac (O365) this has changed in 2023.
Outlook Mail finally supporting SVG might actually increase the pressure on gmail to fix it ..