Re: IMG tag and allowed image types...

lilley (lilley@afs.mcc.ac.uk)
Fri, 21 Jul 1995 18:57:57 +0100 (BST)


Adam Thodey wrote:

> I was wondering if there was a standard (i did not notice this in the
> 3.00 spec) which would only allow certain types of graphics, i.e., GIF,
> XBM etc.?

No, ther eis not one in the standard, nor is there likely to be.

> Would this mean that if the browser supports inline JPEGS or inline TIFF
> or inline PICT that this is acceptable HTML inclusion?

There are two questions here that need to be disentangled.

1) If my browser supports inline foo is it acceptable for my browser
to request an inline image of type foo? The answer is yes. If the
server has that image in format foo it will send that by preference.

It is more likely that your browser will say it can accept inline images
in several formats: foo bar etc and the server will send whichever of these
it has (or an error saying, nothing suitable was found).

This is called content negotiation and relies on the client expressing
which formats it can accept and the server being able to supply the various
formats; possibly by performing a conversion on the fly. Not all clients
and not all servers can do this. Also, most content authors link to
explicit formats. Also, image format conversion while maintaining quality
is not as simple as it looks.

2) If my browser supports inline foo should I write pages with an
explicit link to image.foo

The answer is, it depends on your audience. If you are fairly sure they
can all read foo format that is fine. For example because they all have
a particular browser (a browser demo or fan club page for example).

In general though, no assumptions can be made; in general, servers do not
do image format conversion on the fly (if anyone has written a server or
server extension that does, feel free to drop me a line as I would like
to test it). So it is a case of authoring what the maximum number of people
can already accept inline.

GIF87a is a safe bet.

GIF89a (the one with transparency) is extremely common and GIF87a
readers can read it, they just ignore the extensions.

XBM is pretty widespread

JPEG JFIF is now common

other formats supported inline include

PICT (some Mac browsers, only)
NCSA HDF (NCSA Mosaic for X, only)
PNG (Amiga Mosaic so far)

Chimera supports just about any format inline, as it is user extendable.

> or is there going
> to be a strict standard for image types?

Clearly, this list will evolve over time. Once popular formats may become
used less (so newer browsers stop supporting them); newer formats may become
more popular. This is why the HTML standard does not dictate a list of
acceptable inline image formats.

-- 
Chris Lilley, Technical Author
+-------------------------------------------------------------------+
|       Manchester and North HPC Training & Education Centre        |
+-------------------------------------------------------------------+
| Computer Graphics Unit,             Email: Chris.Lilley@mcc.ac.uk |
| Manchester Computing Centre,        Voice: +44 161 275 6045       |
| Oxford Road, Manchester, UK.          Fax: +44 161 275 6040       |
| M13 9PL                            BioMOO: ChrisL                 |
|     URI: http://info.mcc.ac.uk/CGU/staff/lilley/lilley.html       | 
+-------------------------------------------------------------------+