I have a site with a couple of hundred images and sizeable text blocks associated with them. To minimize load time, I display thumbnails that link to the full sized image. All these are in tables, generally three to a row. An example:
<a href="foo.jpg"><img src="foo_t.jpg" alt="Foo!" height=188 width=234></a>
This works, but presents some maintenance problems. I just picked up a neat little script from the B&T site, to output a resized image (attached file). I hard-code the thumb height (all are 188px) and let the width adjust.
<a href="foo.jpg"><img src="resize.php?path=foo.jpg" alt="Foo!" height=188></a>
This does work, but I would like to 1) somehow return the computed thumb width, so I can have the html explicitly define it, and 2) only enter the image file name (and path) once. Sort of like:
image.php?path=foo.jpg,alt="Foo!"
and have the php script emit the full <a> tag as in the first example. Am I hoping for too much form the php/html interface? Any suggestions on how to proceed?
Thanks!
Dave