in reply to Re^2: Display an image with a CGI program?
in thread Display an image with a CGI program?

i am also facing a similar kind of problem. Below is my code.The image is not displayed. Can anyone help me out.
use CGI qw(:all); print "Content-type:text/html\n\n"; print '<HTML> <head></head> <body> <h1> <img src="../images/example_product_loading.gif" alt="site_imag +e" width="800" height="200"> Test Imageeeee. </h1> </body> </HTML>';

Replies are listed 'Best First'.
Re^4: Display an image with a CGI program?
by marto (Cardinal) on Mar 14, 2011 at 10:39 UTC

    Did you check the webserver logs to see if there is any indication of a problem?

Re^4: Display an image with a CGI program?
by Corion (Patriarch) on Mar 14, 2011 at 09:26 UTC

    Can you access the image directly, without your script?

    Read the thread you replied to, as it contains the answer to your question.

      No i cannot access the image dirctly. It is picking up the particular .gif file but is showing a "X" sign.

        If you cannot access the image directly, first debug that. See Display an image with a CGI program? and the replies to it. Also look in your webserver error log. If you cannot access http://wherever.example/yourapp/image.gif , that is a webserver configuration issue and has nothing to do with Perl.