我正在向我的会员发送电子邮件,看起来Gmail正在阻止我在电子邮件中放置的图片.它们作为基础64编码的字符串嵌入到img标记中.我在网上查看了多个关于Gmail不发送图片但没有找到任何有用的内容的主题.以下是我到目前为止尝试过的一些事情.1.在Gmail中启用外部图像(通过设置图标)2.将图像的大小减小到8000字节以下(Outlook.com不会发送图像~15000字节)
如果我发送到outlook.com电子邮件地址,我会收到图片,但在Gmail中,img标签的src为空,电子邮件中没有图片显示.我正在使用https://putsmail.com来测试/发送我的电子邮件,所以我知道问题不是SendGrid(我的电子邮件发送服务)或我的应用程序的问题.
这是我下面的模板之一.我正在使用来自litmuss的电子邮件模板.下面的所有内容基本上都是默认的,除了我添加的额外信息,如图片和电子邮件正文中的一些额外文字.
这是一个带有图像数据的完整模板的jsfiddle,可以直接复制到putsmail中并发送给测试!任何关于Gmail不发送图片的帮助或信息都会很棒!
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<style type="text/css">
/* FONTS */
@@media screen {
@@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v11/qIIYRU-oROkIk8vfvxw6QvesZW2xOQ-xsNqO47m55DA.woff) format('woff');
}
@@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v11/qdgUG4U09HnJwhYI-uK18wLUuEpTyoUstqEm5AMlJo4.woff) format('woff');
}
@@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 400;
src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v11/RYyZNoeFgb0l7W3Vu1aSWOvvDin1pK8aKteLpeZ5c0A.woff) format('woff'); …Run Code Online (Sandbox Code Playgroud)