简体   繁体   中英

Images in e-mail not showing up

The image is showing up in perfectly gmail but is blank in several other e-mail programs. Not sure what's wrong. i have confirmed the actual links and have images turned on.

<a target="_blank" href="https://site" style="display: block; height: 200px; width: 200px; margin-top: 4px; border: 0;">
<img src="https://image" alt="image" border="0" style="display: block; border:0;" />
</a>

Most email programs strip images out of emails since they can be used to track users. This is particularly commonly done by spammers to verify active email addresses. To work around this you can attach the images to the email itself.

I would check to see if a non secure image using a regular http:// link works. It is remotely possible a host machine or email application might be blocking port 443 used by SSL. Since Gmail is cloud based, you would not have that problem.

I had a similar problem, and chose a rather radical workaround to avoid messing with the mail client's rules.. You can convert your image to a bitmap represented by a colored HTML table. The basic idea is quite simple, and you can find several tools that do that on the internet. Of course with large bitmaps the resulting table could be hundreds of kilobytes long; when I had this problem I wrote a tool that applies some simple compression methods to that table, and released the code under GPL.

Might not be the cleanest solution but it works without too much compromise on the e-mail design.

Tool for converting images to plain HTML with some compression

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM