Click here to get back home

inline images

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
inline images yawnmoth 12-27-2005
`--> Re: inline images Alexander Claus...12-27-2005
Posted by yawnmoth on December 27, 2005, 2:48 am
Please log in for more thread options


http://us2.php.net/manual/en/function.imagegif.php#20425

The above URL suggests that it's possible to sorta embed images within
an HTML document so that they don't have to be loaded via a seperate
HTTP request. The idea intrigues me, although I can't seem to get it
working. Is the idea sound or is that link just kinda bogus?

Here's my (failed) attempt:

http://www.geocities.com/terra1024/inline_gif.html

(I apologize for the mangled HTML that geocities produced)


Posted by Bart on December 27, 2005, 4:51 pm
Please log in for more thread options


Op 27 Dec 2005 02:48:30 -0800 schreef "yawnmoth"

>http://us2.php.net/manual/en/function.imagegif.php#20425
>
>The above URL suggests that it's possible to sorta embed images within
>an HTML document so that they don't have to be loaded via a seperate
>HTTP request. The idea intrigues me, although I can't seem to get it
>working. Is the idea sound or is that link just kinda bogus?
>
>Here's my (failed) attempt:
>
>http://www.geocities.com/terra1024/inline_gif.html
>
>(I apologize for the mangled HTML that geocities produced)

Try this:


<p>
Demo: You should see an image here:<br>
<img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAALHRFWHRDcmVhdGlvbiBUaW1lAFR1ZSAyNiBPY3QgMjAwNCAwMDowNDoyMCAtMDAwMMDfY6EAAAAHdElNRQfUChkXBTf%2BeRCSAAAACXBIWXMAAAsSAAALEgHS3X78AAAABGdBTUEAALGPC%2FxhBQAAB1RJREFUeNrVmHlwU1UUxr%2BbrUnalFaQVpaWpSLL6IigQnFhm1FZBhWoA6igIAUcQKnKKo5QZBMVWXSgKG7jiFQ6MIKAiDgoVXFQ%2FAMVKUKtVqB2oU3SbNfvRouxNs1LG0g4HaavL%2Ffm3R%2FnnO%2Bc8wQuT%2BuUjJZLdNAP8sGrM8L0bL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PWYLTozJEN01vAOuMuYW1Mte1D9sroglxAaQWjmIr4tMOYk%2F3NiLdmMZ2UKDx11wqp7bhLec2vOGfs6MJcQGEJhkinzFX2hzAru5mYdGxsxWGICOwauHzsbn2TbnmHAezCdGGCARR5nKgZl8czPIbfNGrGCd1GaK7msUvLFA5dBI%2F4RW51LULW0s5Y0%2BMBQhlDcWPIEwmB6b1Rpi6DMQw863iDr8XDshd3k%2Bx080R9yvWnSkckS9etxkBkDpLbY02091wjdZDL%2BgN9eKt1I3aDWU4uwWIcHPWTPsLuA7uMDvFxYYAAAAASUVORK5CYII%3D"
alt="Oops, your browser seems to think that you just don't need this
functionality" title="">
</p>

Copied from:
http://www.howtocreate.co.uk/wrongWithIE/?chapter=Data%3A+URIs
Read the text there.

IE 5.5 does not support it, not sure about later versions.

Bart
--
Bart Broersma
broersma.juda_ANTISPAM_@tiscali.nl
(ff _ANTISPAM_ wegpoetsen uit dit adres natuurlijk)

Posted by Alexander Clauss on December 27, 2005, 7:03 pm
Please log in for more thread options



> Here's my (failed) attempt:

<img src="/-/data:image/gif;base64,R0lGODdhMgAyAI...
^^^^^
These characters are wrong and must be removed.

The URL must start with "data:" to define any inline-data.

Like "http:", "ftp:", "file:", "mailto:" the protocol part "data:" must
be the beginning of the URL. Otherwise it can't be recognized because.
If the URL would start with "/" then the URL must be treated as relative
URL and will be resolved relative to the URL of the document itself and
so the data is loaded from the web and not treated as inline data. So
the real URL would be

http://www.your-domain.com/-/data:image/gif;base64,R0lGOD...

But if you really want to define the data inline you have to use:

data:image/gif;base64,R0lGODdhMgAyAI...

--
Alexander

Similar ThreadsPosted
inline frames September 21, 2005, 8:48 pm
CSS gap between inline elements February 7, 2008, 3:03 am
display: inline question? April 26, 2008, 1:11 pm
Restricting inline image size March 29, 2005, 6:56 pm
Re: Restricting inline image size March 29, 2005, 9:24 pm
Re: Restricting inline image size March 30, 2005, 2:07 am
Two lines of text in inline context September 1, 2005, 5:40 am
"Glueing" grapchic with inline text together? November 4, 2005, 10:20 am
Showing target of a link inline November 15, 2005, 6:00 pm
DTD? Is address element block or inline? December 15, 2005, 10:16 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap