|Don't ask to ask, just ask
No! I am saying just the opposite!
Your images ARE recognizing as cgi-scripts right now, they should obviously be seen as images!
And, then secondly, I dont even check if you images exists, let alone read them in. I really cant see where that idea came from?
Move your pics library from the cgi-bin dir to the .../htdocs, give it permission for everyone to read chmod 755 pics; chmod -R 644 pics; and then it should work.
Then go read a introduction to HTML and HTTP, and try to understand why it went wrong.
T I M T O W T D I