Gmail 中未显示 HTML 图像 [英] HTML image not showing in Gmail

查看:16
本文介绍了Gmail 中未显示 HTML 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在发送 HTML 格式的电子邮件通讯.在 HTML 里面我有类似的东西

I'm sending an e-mail newsletter in HTML. Inside the HTML I have something like

<img height='70' width='70' style='display:block' src='myDomain.com/imageName.png'>

当我使用 Thunderbird 或 Outlook 打开时事通讯时,图像正在显示.但是,当我使用 Gmail 打开它时,没有显示任何图像.我不确定这是否与 Gmail 出于安全原因使用的代理有关,还是其他原因.无论哪种方式,我都想知道是否有人遇到过这个问题,如果有,是如何解决的.

When I open the newsletter with Thunderbird or Outlook, the image is being displayed. However, when I open it with Gmail, no image is shown. I'm not sure if it's about the proxy that Gmail uses for security reasons or if it's something else. Either way, I'd like to know if anyone ever came across this and if so, how it was solved.

推荐答案

派对迟到了,但这里开始......我也遇到过这个问题,并通过以下方式解决:

Late to the party but here goes... I have experienced this problem as well and it was solved with the following:

  • 在 src url 中包含方案(使用//"不起作用 - 使用完整方案 EG:https://")
  • 包括宽度和高度属性
  • 包括 style="display:block" 属性
  • 同时包含 alt 和 title 属性

EG:

<img src="https://static.mydomain.com/images/logo.png" alt="Logo" title="Logo" style="display:block" width="200" height="87" />

这篇关于Gmail 中未显示 HTML 图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆