• <tfoot id='i3JeY'></tfoot>
    • <bdo id='i3JeY'></bdo><ul id='i3JeY'></ul>

      <small id='i3JeY'></small><noframes id='i3JeY'>

      <legend id='i3JeY'><style id='i3JeY'><dir id='i3JeY'><q id='i3JeY'></q></dir></style></legend>
    1. <i id='i3JeY'><tr id='i3JeY'><dt id='i3JeY'><q id='i3JeY'><span id='i3JeY'><b id='i3JeY'><form id='i3JeY'><ins id='i3JeY'></ins><ul id='i3JeY'></ul><sub id='i3JeY'></sub></form><legend id='i3JeY'></legend><bdo id='i3JeY'><pre id='i3JeY'><center id='i3JeY'></center></pre></bdo></b><th id='i3JeY'></th></span></q></dt></tr></i><div id='i3JeY'><tfoot id='i3JeY'></tfoot><dl id='i3JeY'><fieldset id='i3JeY'></fieldset></dl></div>
      1. Base64 编码的图像未在 gmail 中显示

        时间:2023-10-01
      2. <tfoot id='RtOBu'></tfoot>

      3. <i id='RtOBu'><tr id='RtOBu'><dt id='RtOBu'><q id='RtOBu'><span id='RtOBu'><b id='RtOBu'><form id='RtOBu'><ins id='RtOBu'></ins><ul id='RtOBu'></ul><sub id='RtOBu'></sub></form><legend id='RtOBu'></legend><bdo id='RtOBu'><pre id='RtOBu'><center id='RtOBu'></center></pre></bdo></b><th id='RtOBu'></th></span></q></dt></tr></i><div id='RtOBu'><tfoot id='RtOBu'></tfoot><dl id='RtOBu'><fieldset id='RtOBu'></fieldset></dl></div>
        <legend id='RtOBu'><style id='RtOBu'><dir id='RtOBu'><q id='RtOBu'></q></dir></style></legend>

        <small id='RtOBu'></small><noframes id='RtOBu'>

          <bdo id='RtOBu'></bdo><ul id='RtOBu'></ul>

              <tbody id='RtOBu'></tbody>

                  本文介绍了Base64 编码的图像未在 gmail 中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个嵌入的 HTML 电子邮件,我在其中使用 base64 编码的图像.通过 chrome 访问时,图像不显示在 gmail 中.但是当通过邮件客户端(Mac 上的邮件应用程序)访问相同的邮件时,它可以正常工作.我已经正确设置了标题.有什么想法吗?

                  I have an embedded HTML email in which I'm using a base64 encoded image. Image doesn't show in gmail when accessing via chrome. But it works fine when accessing same mail via mail client(Mail application on Mac). I have set headers correctly. Any idea?

                  我的代码

                  <html>
                      <body>Hi
                          <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAREAAAALCAYAAABYrrnHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABANpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjVEMjA4OTI0OTNCRkRCMTE5MTRBODU5MEQzMTUwOEM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVGMjU1MzZBQUVGQjExRTc5NUQyQTc1MzA0RERGMTVGIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVGMjU1MzY5QUVGQjExRTc5NUQyQTc1MzA0RERGMTVGIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIElsbHVzdHJhdG9yIENDIDIwMTcgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0idXVpZDpiNDQ5NzVjYy00YmI1LTRmNzAtODRiZi0zMGU2NjFkYmY3ZDMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZDc1MTVmZDQtMjkzZS00ZWI5LWFiMjQtOTMzYzRkZjNmOTY4Ii8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+bXRrYV9hY3RpdmF0aW9uX2NhcmQ8L3JkZjpsaT4gPC9yZGY6QWx0PiA8L2RjOnRpdGxlPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pr6AOtYAAABESURBVHja7NZBDQAwCARB2tS/m6qoKIoGvswkGNjHhQgAAACAeVbdkwHoOnVXBqD9iWSmCkDblgAwIoARAYwIMNAXYACy9wSMWMVdzAAAAABJRU5ErkJggg==" width="273" height="11" alt="">
                      </body>
                  </html>
                  

                  标题

                  Content-Type: text/html; charset=utf-8
                  Content-Transfer-Encoding: quoted-printable
                  

                  推荐答案

                  base64 编码的图像在电子邮件中没有得到很好的支持. 大多数网络电子邮件客户端(包括 Gmail)不支持它们并且是在 Outlook 中完全被阻止.Apple Mail 是为数不多的确实支持它们的客户端之一,这就是为什么你可以在那里看到它们但在其他地方看不到的原因.

                  base64 encoded images are not well supported in email. They aren't supported in most web email clients (including Gmail) and are completely blocked in Outlook. Apple Mail is one of the few clients that does support them, that's why you're able to see them there but not elsewhere.

                  使用 base64 编码图像要注意的另一件事是电子邮件文件的大小.Gmail 应用程序(iOS、Android)和 Outlook (iOS) 会截断文件大小超过 102KB 的电子邮件.远程引用的图像(例如 <img src="http://www.website.com/image.png"> 不计入电子邮件的文件大小,但 base64 编码图片,并且可以快速将电子邮件的文件大小超过 102KB 限制.只是需要考虑的其他事项.

                  Another thing to be mindful of with base64 encoded images is email file size. Gmail App (iOS, Android) and Outlook (iOS) truncate email messages whose file size exceeds 102KB. Remotely referenced images (Eg. <img src="http://www.website.com/image.png"> do not count towards the email's file size, but base64 encoded images do and can quickly blow out an email's file size past the 102KB limit. Just something else to consider.

                  这篇关于Base64 编码的图像未在 gmail 中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将 Web 字体转换和渲染为 base64 - 保持原始外观 下一篇:Node.js 中的安全随机令牌

                  相关文章

                    <bdo id='4wzub'></bdo><ul id='4wzub'></ul>
                    <tfoot id='4wzub'></tfoot>

                    <small id='4wzub'></small><noframes id='4wzub'>

                      <legend id='4wzub'><style id='4wzub'><dir id='4wzub'><q id='4wzub'></q></dir></style></legend>
                    1. <i id='4wzub'><tr id='4wzub'><dt id='4wzub'><q id='4wzub'><span id='4wzub'><b id='4wzub'><form id='4wzub'><ins id='4wzub'></ins><ul id='4wzub'></ul><sub id='4wzub'></sub></form><legend id='4wzub'></legend><bdo id='4wzub'><pre id='4wzub'><center id='4wzub'></center></pre></bdo></b><th id='4wzub'></th></span></q></dt></tr></i><div id='4wzub'><tfoot id='4wzub'></tfoot><dl id='4wzub'><fieldset id='4wzub'></fieldset></dl></div>