Jump to content

How to embed not a link to small picture but the picture itself into html source?

Recommended Posts

Assume I have an element like

<img src="https://www.foobar.com/mysmallpic.png" ......>samplepic</img>

Now I want to avoid a linking to a picture source on an external server.

Instead I want to embed the few KB of the picture directly into HTML source code. I can imagine that there is a method similar to

<img src=x'21315112A56CED......58889EFED' ......>samplepic</img>

or alternatively with variable:

mypic=x'21315112A56CED......58889EFED' ;

<img src=mypic .....>samplepic</img>

x'...' means the hexadecimal binary content (ANSI or Unicode ?) of the picture source.

Is this somehow possible?


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...