Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Embed an Image into Body HTML
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01587392
Message ID:
01587428
Views:
46
Hi Gerard,

I don't think that's a web standard. And it's implementation in email seems to be spotty, and often different based on client. And apparently it helps email get marked as spam.

Converting to base64 is easy using strconv(), as Dragan notes.

For email, there are additional considerations: http://stackoverflow.com/a/9110164/453277

Hank



>Hi Hank. Yhanks for replying.
>I used the example and , yes, that works fine, but does'nt it mean you have to convert the Image to base64 first , and then insert the Base64 string into your HTML ?
>
>What I am looking for, and think it is available using the cid tag, was to be able to embed a file (not a linked File) but without having to convert to Base64 in advance
>
>regards,
>Gerard
>
>
>
>>Try this: http://webcodertools.com/imagetobase64converter
>>
>>That will give you a live example, and you can create your own using VFP after that.
>>
>>Hank
>>
>>>Hi Viv. Thanks for replying.
>>>Your solution I think requires a conversion of the image to Base64 in advance.
>>>I gather that there is a different way of doing this (but without having a link and using cid ??)
>>>
>>>Regards,
>>>Gerard
>>>
>>>
>>>>>Hi.
>>>>>I am trying to embed an image (dont want the image linked to a server) in the body of an email
>>>>>I create the HTML page with the various tags but cannot get the Image to imbed
>>>>>I know I have to use img src="cid:MyFilename" but not sure if this is ALL thats required or do I need additional code to attach the image also?
>>>>>Also , do I need to point to the absolute file reference in MyFileName or is this done somewhere else ?
>>>>>
>>>>>Lots of sample using PHP out there , but has anybody had a sample of HTML code that embeds a file
>>>>>(The embedded file will either be a signature or a company logo that is appers near or at the end of the email text)
>>>>
>>>>I thought you have to include base64 data for the image? Something like:
<img src="data:image/png;base64,/VHb/5RGQ0 Q0PzM....hoxtb0QGhoQ2HwRQ
>>>> AAAAAElFTkSuQmCC"  />
>>>>
>>>>But quite a few email clients will refuse to display it anyway :-{
>>>>
>>>>>Tia
>>>>>Gerard
Previous
Reply
Map
View

Click here to load this message in the networking platform