473,805 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

inline images

http://us2.php.net/manual/en/functio...egif.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)

Dec 27 '05 #1
3 2683
Op 27 Dec 2005 02:48:30 -0800 schreef "yawnmoth"
<te*******@yaho o.com>:
http://us2.php.net/manual/en/functio...egif.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,iVBO Rw0KGgoAAAANSUh EUgAAADIAAAAyCA YAAAAeP4ixAAAAL HRFWHRDcmVhdGlv biBUaW1lAFR1ZSA yNiBPY3QgMjAwNC AwMDowNDoyMCAtM DAwMMDfY6EAAAAH dElNRQfUChkXBTf %2BeRCSAAAACXBI WXMAAAsSAAALEgH S3X78AAAABGdBTU EAALGPC%2FxhBQA AB1RJREFUeNrVmH lwU1UUxr%2BbrUn alFaQVpaWpSLL6I igQnFhm1FZBhWoA 6igIAUcQKnKKo5Q ZBMVWXSgKG7jiFQ 6MIKAiDgoVXFQ%2 FAMVKUKtVqB2oU3 SbNfvRouxNs1LG0 g4HaavL%2Ffm3R% 2FnnO%2Bc8wQuT% 2BuUjJZLdNAP8sG rM8L0bLQPFK5Zzb BMs6HFqRuQWfWm2 CsfEU%2F4ktHqJ0 O0TxaG2WxIfNkHX 9ZYMcU4EuONBMKP %2BF5I%2BCyXBUg SWl5tgSVPAjc9KZ 6L64P%2BgmH1nzW 6aB8ylA3DfTe3QP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s6MJcQGEJhk inzFX2hzAru5mYd GxsxWGICOwauHzs bn2TbnmHAezCdGG CARR5nKgZl8czPI bfNGrGCd1GaK7ms UvLFA5dBI%2F4RW 51LULW0s5Y0%2BM BQhlDcWPIEwmB6b 1Rpi6DMQw863iDr 8XDshd3k%2Bx080 R9yvWnSkckS9etx kBkDpLbY02091wj dZDL%2BgN9eKt1I 3aDWU4uwWIcHPWT PsLuA7uMDvFxYYA AAAASUVORK5CYII %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/wrongWi...r=Data%3A+URIs
Read the text there.

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

Bart
--
Bart Broersma
br************* ********@tiscal i.nl
(ff _ANTISPAM_ wegpoetsen uit dit adres natuurlijk)
Dec 27 '05 #2
yawnmoth <te*******@yaho o.com> wrote:
Here's my (failed) attempt:


<img src="/-/data:image/gif;base64,R0lG ODdhMgAyAI...
^^^^^
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:im...;base64,R0lGOD...

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

data:image/gif;base64,R0lG ODdhMgAyAI...

--
Alexander
Dec 27 '05 #3

On 27 Dec 2005, yawnmoth wrote:
http://us2.php.net/manual/en/functio...egif.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)


I have an example on my HTML Sampler page:
http://www.chebucto.ns.ca/~af380/html.html#part6a
(and a link to the appropriate RFC).

Use Something like this:

<img src="data:image/gif;base64,base 64-encoded image-bytes-go-here"
alt="appropriat e-alt-text">

replacing the 'base64-encoded image-bytes-go-here' with the appropriate
base64 representation of the image, adding appropriate alt text and
changing the image type if it's a JPG or PNG file. (One way to get it if
your email reader doesn't store stuff in some proprietary format is to
email the image to yourself as an attachment and then snip the raw
un-decoded base64 code from the email with a text editor. Another way is
to get the UUDEVIEW/UUENVIEW freeware package and use UUENVIEW with the
appropriate switch to encode the image and then snip our the headers it
adds to the base64 code.)

Note that this works with Firefox and Opera but IE version 6 on my machine
doesn't recognise the "data:" protocol.

--
Norman De Forest http://www.chebucto.ns.ca/~af380/Profile.html
af***@chebucto. ns.ca [=||=] (At the Sign of the Flashing Cursor)
"Oh how I miss the days when it was easier to catch gonorhea than a
computer virus." -- Big Will in alt.comp.virus, March 9, 2005

Jan 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
7050
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable other browsers) it stays on the same place (does not "open'' where the mouse is). And the links do not work when you click on them. If anyone has sugestions on how to improve it, please let me know.
3
7701
by: Aaron | last post by:
Hi, I'm trying to use style sheets instead of tables for layout, but I'm not sure on how to do something... I have a div (100% width) containing 3 other divs. Each needs to be lined up next to one another inside the first div. Whenever I nest these divs inside the first, it always treats each of them like a block element and puts them on the next line down. If I try to define 'block: inline' for each of them, the ones without images...
10
3836
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/dev/test.html I'd like to have the colored boxes appear on the same line as "Test" does. The div containing the colored boxes is defined as being inline, yet doesn't seem to be acting as an inline element. I suspect the floats in the images within the div may be contributing to the problem, but I don't know what to do about it if that's the case. Any ideas?
3
1304
by: Sergio | last post by:
Hi, I know how to use SmtpMail to create and send a mail message in text or HTML format. I always use the URL to the location of images on the server to include those images in my mail body. However, recently I was asked if it is possible to use inline images, included (as attachments?) in the mail
15
2350
by: otto | last post by:
Any suggestions? I want a sequence of composite "blocks" (e.g. image and caption representing a product category) to wrap like text as a browser is made wider/narrower. Tables are not working well for this application. Any fixed choice of column numbers is always the wrong choice! I looked up about CSS block flow , found "display:inline-block;" and thought problem solved - till I tested in IE & FF. Nightmare!!! After *much* fiddling I...
10
2372
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
7
5440
by: massic80 | last post by:
Hi everybody! I'm making a page for an exam at uni. In two DIV blocks of it there should appear (and disappear) some "icons", due to XML messages, so I dunno how many of them should I can obtain; I want to show a small image, with its "icon name" under it, so I thought to use a DIV where I put a small image, a <br/and the icon name (and text-align:center as CSS). My page is fully liquid, so my DIVS may be resized, and I wanted them to be...
6
1596
by: Geoff Cox | last post by:
Hello, I am using the following css ..hiddenDiv2 { display: none; } ..visibleDiv2{ display: inline;
3
1691
by: AleXmanFree | last post by:
Hi , I have got problem with passing my inline based value to y user control (or custom control, no matter which one I use, I have tried both to make sure it doesnt matter) . So say I have property called ImagePath and i want to pass my value through asp.net specific inline cunstruction: <uc:MyControl runat=server id="someId" ImagePath="<%= Request.ApplicationPath %>/App_Themes/<%= Page.Theme %>/Images/ ball_.png" />, problem that in...
1
2931
by: AleXmanFree | last post by:
Hi , I have got problem with passing my inline based value to y user control (or custom control, no matter which one I use, I have tried both to make sure it doesnt matter) . So say I have property called ImagePath and i want to pass my value through asp.net specific inline cunstruction: <uc:MyControl runat=server id="someId" ImagePath="<%= Request.ApplicationPath %>/App_Themes/<%= Page.Theme %>/Images/ ball_.png" />, problem...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.