【问题标题】:Gmail image problem - Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does notGmail 图像问题 - 无法在“DOMWindow”上执行“postMessage”:提供的目标来源(“<URL>”)没有
【发布时间】:2019-02-18 11:42:29
【问题描述】:

我经营一个网站,人们经常在该网站上复制并粘贴我网站的输出,然后通过电子邮件将其发送给他们的客户。该网站输出航班详细信息,其中包括一些图像,如下所示:

当用户从我的网站复制内容,将其粘贴到 Outlook/mail 中时,一切正常,图像显示正确,

但是,如果电子邮件的收件人使用 gmail,则图像会显示为断开的链接

如果我检查 Gmail 中的图像元素,则图像 src = https://ci3.googleusercontent.com/proxy/ILKyipOTRb8QYVwkcZjePBkX69veJwqeS5fACyVhX2QnAswpuJKXodiMxxv0hRDXoiyxH7W0dsGx4PO9YHpCC8QV=s0-d-e1-ft#https://pnrconverter.com/images/airlines/nz.svg"

其中https://pnrconverter.com/images/airlines/nz.svg 是存储图像的网址。

在控制台中我收到以下错误消息

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://hangouts.google.com') does not match the recipient window's origin ('https://mail.google.com').

然后

Failed to load resource: the server responded with a status of 404 ()

关于堆栈溢出的大多数其他解决方案都涉及 iframe,但是我的网站中没有使用 iframe,

有人有什么建议吗?

谢谢

【问题讨论】:

    标签: html dom gmail postmessage


    【解决方案1】:

    如果其他人遇到这个问题,答案很简单,gmail 不支持 svg 图片。它们需要是 PNG 或 JPG!

    【讨论】:

      猜你喜欢
      • 2019-12-30
      • 2018-03-05
      • 2019-12-09
      • 2019-05-25
      • 2021-05-26
      • 2019-10-10
      • 2018-05-29
      • 2019-11-05
      相关资源
      最近更新 更多