Expanded Image Table Spec

I’ve realized in working on the MacWEEK website, that there is a huge volume of images being served. I’m without a doubt that there is redundancy involved, and that potentially there are many images that could be used for stories, which are unfindable, because they exist in no database aside from the #images table in Frontier.

The #images table is fine and dandy, but I wanted a way to be able to search for images by keyword. I wanted thumbnails. I wanted builtin rollovers (images that kenw how to roll over to another image when the mouse pointer was over them, automagically). I wanted to be able to specify a link for an image no matter when it was used. I wanted have images that knew about photo-credits. None of this was accounted for by the mainResponder, the website framework, or Manila. So here’s a specification for review:

Like the glossary, an image has other ancilliary data associated with it, like this:

A glossary item has the URL and the linetext.

An image has the following:

  • The image data (the only part currently handled by Frontier)
  • Optional rollover image data
  • Optional tumbnail data
  • Optional photo credit (eg Author)
  • Optional description, possibly used to index in a search engine
  • Optional link for use in wrapping anchor tag
  • Optional ‘alt’ information used in the ALT field of the IMG tag

Note that all the fields except the image data itself are optional, in other words, if they don’t exist, there is an apropriate default behavior available.

I’m currently working on implementing this kind of scheme. As it stands, it requires setting the ‘imageFolderSubtables’ directive to ‘true’, however that may change.

In the mean time, a note to Userland: Why do I have to write .jpg images to disk to find out their height and width? All the data is available inside Frontier. html.getImageData shouldn’t have to do this. It’s a big hit on the server in terms of time, if caching is off…

Comments are closed.