在 HTML 电子邮件中发送 base64 图像

编程入门 行业动态 更新时间:2024-10-25 04:21:06
本文介绍了在 HTML 电子邮件中发送 base64 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用富文本编辑器,我们的用户可以将保存的图像从桌面拖放到编辑器中.提交后,图像在网页中出现并正确显示.

Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit.

由于图片没有上传到任何地方,编辑器将图片保存为base64编码的图片.

Since the image is not uploaded anywhere, the editor saves the image as a base64-encoded image.

<img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAFKCAIAAADKUQaBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAP+lSURBVHhepP1p32zb

但它没有出现 - 不在 iPhone 上,也不在两个不同版本的 Outlook 上.图像简直是破碎的.我们希望坚持使用 base64,因为它已经可以与网页一起使用,并且能够在用户离线时查看图像.

But it doesn't show up - not on the iPhone, nor two different versions of Outlook. The image is simply broken. We want to stick with base64 due to it already working with the web page and the ability to view an image if the user is offline.

推荐答案

不幸的是,支持充其量是残酷的.这是有关该主题的帖子:

Support, unfortunately, is brutal at best. Here's a post on the topic:

www.campaignmonitor/blog/email-marketing/2013/02/embedded-images-in-html-email/

以及帖子内容:

更多推荐

在 HTML 电子邮件中发送 base64 图像

本文发布于:2023-10-29 09:47:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539375.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   电子邮件   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!