AFAIK the cgi-script should print the image
data instead of the imagelocation.
open(IMG, "../images/pic1.png") or die ($!);
print while(<IMG>)
close(IMG);
uhm, or something similar :)
nevertheless, I may be wrong with this assumption.
--
trust in bash
but tie your camel