[thelist] ASP redirect to an image?

Chris Houston. chris at phosphors.net
Sun Sep 24 06:58:24 CDT 2000


Hey there.

I just had this thought - is it possible to do a response.redirect or
server.transfer to an image file in ASP?

Imagine this scenario:

You have a directory full of high resolution images on your server (I was
thinking of product shots), all referenced to the relevant products in the
database. Then you call an image from your HTML code, like <img
src="imageresize.asp?ProdID=3254&width=100">, and imageresize.asp gets the
correct product picture, resizes it to the specified size, stores it
temporarily in some directory, and redirects to the newly resized image.

The advantage is that you can just upload one high resolution image which
will be resized to various sizes throughout the site (thumbnail-size,
normal-size, promo-size, etc.)

Obviously server.transfer would be a preferable option, what with it not
doing the "object moved" thing, but does it only work with text/html types?
and would a browser respond to an "object moved" for an image?

Chris Houston.





More information about the thelist mailing list