HTML图片没有在Gmail中显示 [英] HTML image not showing in Gmail

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

问题描述

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



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



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

解决方案

到这个派对但是这里去...我也遇到过这个问题,它解决了以下问题:





  • 包含宽度和高度属性

  • li>包含style =display:block属性
  • 包含alt和title属性



  • EG:

     < img src =https://static.mydomain.com/images/logo.pngalt =Logotitle =Logostyle =display:blockwidth =200height =87/> 


    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'>

    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:

    • Including the scheme in the src url (using "//" does not work - use full scheme EG: "https://")
    • Including width and height attributes
    • Including style="display:block" attribute
    • Including both alt and title attributes

    EG:

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

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

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