Yes, it's not hard.
Assuming that you are using
<img src="getImage.asp?id=73" />
you would need to do
' make sure that the < in the above line is the FIRST CHARACTER in the ASP page!!!
' what image was requested?
imageid = CLNG( Request("id") )
... here you need to go find the image to match the imageid ...
... we will assume that you find some FILENAME, here called fname:
fname = ... you supply this code ...
' Set the content type to the specific type that you are sending.
' Find the extension of the fname, thus:
period = InStrRev(fname,".")
If period = 0 Then Response.End
fext = Mid(fname,period+1)
' Then tell the browse what the type is:
Response.ContentType = "image/" & fext
Set strm = Server.CreateObject("ADODB.Stream")
strm.Type = 1 ' binary stream
' assuming fname is *RELATIVE* to the current directory:
' (omit the Server.MapPath if fname is already a full Windows path!)
Response.BinaryWrite strm.Read ' write the entire image out to the browser
Set strm = Nothing
Response.End ' important!