Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do i embed pictures into HTML? I have a cron job that sends an HTML file and I'm using
Code:
<img src="http://mysite/picture.gif">
to include a picture in the email.
The problem is that when the user recives the email, Thunderbird or outlook will ask whether to download the the picture from the site or not. The picture contains my companies logo and i would like it to show up the moment the user opens the email.
I've seen it done before I've seen some articles about embedding GIF using base64 encoding but i have no clue how to do that...
Anyone can help?
Last edited by waelaltaqi; 02-06-2008 at 08:11 AM.
that's really none of your business, it's the client taking measures to protect the user irrespective of the file. you shouldn't be able to influence that at all, or that would totally destroy the security measures in the first place.
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
attach the image (base64 encoded) with
Content-ID: <image01.png@FFFFFFFF.FFFFFFFF>
in the html part, reference as source of the image the Content-ID like so: "cid:image01.png@01C8584B.D9F65490"
that will then point to the attachment rather than an external image
i would personally use a png rather than a gif!
@moderators: remove this if you find it inappropriate, as i am sure you would anyway :-)
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
it does not look like the clients block the displaying of attached images, but of course it's slightly ugly, as it increases the email size, and also all your emails have an attachment.
i also am not sure what happnes if you simply have a div and add a background image with css to that, would be worth a try.
I got half of the problem resolved. I was able to convert my companies logo using uuencode then embed it into HTML using base64 encoding. Part of my code looks like this:
I get the picture to show up fine with Firefox but not with IE. Now since IE can't then Outlook won't open it either. I've read that IE can't read base64 type encoding without further adjustment to the code. Does using MHTML type docs need completely different code or what... Little frustrated here ... Any ideas on that part?
Thanks in advance.
Last edited by waelaltaqi; 02-07-2008 at 10:37 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.