HTML电子邮件图片标记缺少src属性 [英] HTML email image tag missing src attribute

查看:356
本文介绍了HTML电子邮件图片标记缺少src属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我无法通过谷歌搜索找到答案。我希望我能在这里得到一个。
我的问题是:我的系统可以发送电子邮件给用户。在本地,电子邮件上的图片标签如下所示:

I have a problem that I cant find the answer by Googling. I hope I can get one here. My problem is: My system can send email to user. On local, an image tag on email is like this:

<img src="http://myimageurl" width="300" style="display:block;margin:auto" alt="">

使用真实服务器时:

When working on real server:

<img width="300" style="display:block;margin:auto" alt="">

正如您所看到的,我的src属性已经消失。我只是不知道为什么!

As you can see, my src attribute is disspeared. I just dont know why!

我的电子邮件tempalte(我使用cakePhp):

My email tempalte(Im using cakePhp):

<?php 
echo $this->Html->image(
    Router::url('/', true). 'img/eventflair-logo.png',
        array(
            'width' => '300',
            'style' => 'display:block; margin: auto'
        )); 
?>

最好的问候。

Best Regards.

推荐答案

默认情况下,Gmail不会在电子邮件中显示图片。要查看原始电子邮件源,请从电子邮件下拉菜单中选择显示原创。

Gmail by default doesn't show images in email. To see the original email source select "show original" from email dropdown menu.

这篇关于HTML电子邮件图片标记缺少src属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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