【问题标题】:php email image not display in gmailphp电子邮件图像不显示在gmail中
【发布时间】:2017-12-07 04:23:47
【问题描述】:

我想在从 php 发送的电子邮件中显示图像。在 yahoo 中显示图像,但在 gmail 中图像丢失。

这是显示图像的代码

 <a href="{{ url:site }}user/active/{{ id }}/{{ code }}"><img alt="" data-pyroimage="true" src="{{ url:site }}image/sample.png" style="width:66%;" /></a>

这是我在 gmail 中检查后的图片网址

<a href="http://ipaddress/user/active/123456/123cp00a42c9b78514000c53f8294e5ec0d0aasgd" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en&amp;q=http://ipaddress/users/activate/123456/123cp00a42c9b78514000c53f8294e5ec0d0aasgd&amp;source=gmail&amp;ust=1233456567575&amp;usg=AFQjCNGTV3UZZ4wSgFSsx_rcn7-mh3UUxw"><img alt="" src="https://ci5.googleusercontent.com/proxy/KaJG60d7WUoIwstJlDYAp8vLq1SSpmWyOZlrgZtUJMtHoBCEr863637_4tdJaibPlgJy7jnzXHs5RGv8C3g=s0-d-e1-ft#http://ipaddress/image/sample.png" style="width:66%" class="CToWUd"></a>

【问题讨论】:

标签: php html email gmail pyrocms


【解决方案1】:

我建议使用img 插件函数来显示物理文件位置。如果这是公共目录中的图像,则可能会起作用:

{{ img('public::image/sample.png').url }}

那么您可以打赌,Google 会将其视为原生图像源。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-12
    • 2017-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-26
    • 2016-12-31
    相关资源
    最近更新 更多