HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
how to embed image in HTML
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics
View previous topic :: View next topic  
Author Message
avinash dubey



Joined: 03 Jul 2006
Posts: 4

PostPosted: Mon Jul 03, 2006 3:58 am     how to embed image in HTML Reply with quote

how to embed image in HTML ?

Hi ,
I am developing an html mail page but don't know how to embed image in the html page itself .

Please reply.
Avinash
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Jul 03, 2006 6:42 am     Reply with quote

Check out images and image tags. If emailing them in an HTML email though, you will need to use an absolute hyperlink.

_________________
Corey
Loud Commerce | Loud Worx | Toll Free Solutions


Last edited by Corey Bryant on Thu Jul 06, 2006 2:53 am; edited 1 time in total
avinash dubey



Joined: 03 Jul 2006
Posts: 4

PostPosted: Wed Jul 05, 2006 7:57 pm     Re: how to embed image in HTML Reply with quote

avinash dubey wrote:
how to embed image in HTML ?

Hi ,
I am developing an html mail page but don't know how to embed image in the html page itself . I don't want to put images on server side and use IMG SRC tag so that every time client will fetch it from server instead i'd like to embed the image in html code itself. Is there any way like some tag <embed >
or converting image to binary and put it into html or something that will do the same .

The purpose for that is
1)Even after disconnecting from the internet client should be able to view the image.
2) I need not to attach the image file every time if it embedded in he HTML itself.

Please send your reply with an example.

Please reply.
Avinash
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Thu Jul 06, 2006 2:53 am     Reply with quote

Did you have more questions?

_________________
Corey
Loud Commerce | Loud Worx | Toll Free Solutions
avinash dubey



Joined: 03 Jul 2006
Posts: 4

PostPosted: Thu Jul 06, 2006 3:50 am     how to embed image in HTML ? Reply with quote

No ,
i don't have more questions even my both previous the queries are reffering the same thing .
Please reply the same ..

Avinash Dubey
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Thu Jul 06, 2006 4:56 am     Reply with quote

What email program are you using? You can try outlook - and embedding that way but I really do not recommend it. It will take longer to download etc.

_________________
Corey
Loud Commerce | Loud Worx | Toll Free Solutions
avinash dubey



Joined: 03 Jul 2006
Posts: 4

PostPosted: Thu Jul 06, 2006 5:38 am     Reply with quote

Email program is not important , important is to load the image in html like in binary or something. I just want not to fetch the image from somewhere it shoukd be embedded in the html code itself.

Thanks
-Avinash
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Thu Jul 06, 2006 10:46 am     Reply with quote

Well Outlook Express offers a way to embed the images. Otherwise, you are asking for an HTML way and in the beginning but then you added the even after disconnecting - so that rules out absolute paths.

_________________
Corey
Loud Info | Loud Worx | Merchant Account Information
greensweater



Joined: 08 Aug 2006
Posts: 2

PostPosted: Tue Aug 08, 2006 1:22 pm     Reply with quote

Depends on how you're trying to do it, but your mail composing program will need a way to send multipart/mime messages. The image is converted to base64 and the data sent by the mailer looks something like:

Code:

From: foo1atbar.net
To: foo2atbar.net
Subject: A simple example
Mime-Version: 1.0
Content-Type: multipart/related; boundary="boundary-example"; type="text/html"

--boundary-example
Content-Type: text/html; charset="US-ASCII"

... text of the HTML document, which might contain a URI
referencing a resource in another body part, for example
through a statement such as:
<IMG SRC="cid:foo4atfoo1atbar.net" ALT="IETF logo">

--boundary-example
Content-Location: CID:somethingatelse ; this header is disregarded
Content-ID: <foo4atfoo1atbar.net>
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNv
cHlyaWdodCAoQykgMTk5LiBVbmF1dGhvcml6ZWQgZHV
wbGljYXRpb24gcHJvaGliaXRlZC4A etc...

--boundary-example--



Note how the HTML code in the first part includes <img src="cid:foo.." the CID means that it's to look in another part of the multipart message.

So you need a mailer which will allow you to do this, with direct HTML editing. Outlook and Outlook Express do not have HTML editing but there are other mailers.


check this link in the PHPlist forums for more information on embedding images in your outgoing HTML: http://www.phplist.com/forums/viewtopic.php?t=4875 ) [/code]
mrLenin



Joined: 23 Nov 2006
Posts: 25

PostPosted: Fri Feb 02, 2007 3:31 am     Re: how to embed image in HTML Reply with quote

avinash dubey wrote:
avinash dubey wrote:
how to embed image in HTML ?

Hi ,
I am developing an html mail page but don't know how to embed image in the html page itself . I don't want to put images on server side and use IMG SRC tag so that every time client will fetch it from server instead i'd like to embed the image in html code itself. Is there any way like some tag <embed >
or converting image to binary and put it into html or something that will do the same .

The purpose for that is
1)Even after disconnecting from the internet client should be able to view the image.
2) I need not to attach the image file every time if it embedded in he HTML itself.

Please send your reply with an example.

Please reply.
Avinash



It's not depend of the way you embed the images. The browser use cashe memory for the content. So ones you are connected you have all images local on your PC. You may even check C:\Documents and Settings\admin\Local Settings\Temporary Internet Files if you use IE.
Shree



Joined: 27 Aug 2008
Posts: 3

PostPosted: Wed Aug 27, 2008 2:53 am     how to embed image in a html email that is sent via OE Reply with quote

Hi,

Am developing a VC++ application which will send
HTML emails to a list of recipients via Outlook
Express or Windows Mail.

In my html email page, I have some local images
which has to be embedded. Can you please help me
out in embedding my local image in the html page?

Actually, I dont know how to create the content ID
for my image & how to set it in my html page. Please
help me out with a small sample.

Waiting for your guidance.

Thanks in Advance,
Shree
Byapti



Joined: 27 Sep 2007
Posts: 1

PostPosted: Thu Aug 28, 2008 2:40 am     Reply with quote

Hi,
I think “Sending HTML with Embedded Image in .NET” article on
http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all may be helpful in this discussion.

This popular white paper is written by a software engineer from our organization Mindfire Solutions (http://www.mindfiresolutions.com).

I hope you find it useful!

Cheers,
Byapti
Shree



Joined: 27 Aug 2008
Posts: 3

PostPosted: Fri Aug 29, 2008 4:54 am     Reply with quote

Hi Byapti,

Thanks for your input.
Actually, its a very nice article & was very
informative too.

The problem is I cannot use .NET Sad . My
Application is completely in VC++ & I have to
continue with it.

My requirement is, My application should send html
emails(which has some local images) via Outlook
Express, Windows Mail & MS Outlook(meaning I should
find the sent emails in 'Sent Items' folder of the
respective mail client).

I suceeded creating & sending html mail with
Embedded images for MS Outlook. Currently, stuck
with doing the same for Outlook Express & Windows
Mail.Can you please help me out.

Thanks
Shree
maneco



Joined: 06 Nov 2009
Posts: 1

PostPosted: Fri Nov 06, 2009 3:16 am     Reply with quote

See RFC 2557. You can insert a image inside html using something like this:

<IMG SRC="data:image/gif;base64,RAAAtuhhx4dbgYKAAA7...more data....." ALT="Larry">
Shree



Joined: 27 Aug 2008
Posts: 3

PostPosted: Tue Nov 10, 2009 9:06 pm     Reply with quote

Thanks for your inputs.

Can you please explain me in detail.

Thanks,
Shree
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial