in reply to HTTP headers and such like

I'm not sure what you mean by "serve each image separately from perl." You're aware that retrieving each image requires a separate request to the HTTP server, right?