[eluser]missionsix[/eluser]
Yeah there would be some performance hit. But not as significant as generating the thumbnails on every request. (less memory usage, less cpu usage). There might be a better way of doing it, i have not performed any benchmarks on my script yet. But its also possible to pass the file to the browser with readfile(); function, instead of reading the saved image in chunks.
Some advantages of dynamically passing the image is the possibility of a bandwidth/hit counter, or restricting image access to certain domains. I'm not a Perl programmer, so these types of scripts seem easier to implement for me in PHP. But I'm assuming it could also be done with Perl as an apache module when an image is directly accessed, thereby reducing the php performance hit, allowing for faster image access, and also allowing for dynamic processing of image information.
Also if anyone has a better way of doing this, please speak up.