Image could not be loaded using CGI program
I am writing to write a cgi script to display a png image in a browser. When user clicks on the 'Submit' form in the HTML page , the CGI program is called to display the image .
But this is not working for me . When the script is executed , the text in alt section from img src HTML tag is displayed , rather than the image
The following is the snippet of CGI code.
echo "Content-type: text/html"
echo "<img src="/home/zaman/graph/SSDGhistory.png" alt="DG-Reports">"
If I write the same code in plain HTML page , the PNG image is displayed fine.
Please suggest what I am missing in the code to display the image without any errors ?