Skip to main content
July 13, 2011
Question

IMG SRC not finding file from CFM

  • July 13, 2011
  • 1 reply
  • 2350 views

Hi, I'm using ColdFusion9 with the 9.01 update and ColdFusion Builder 2 on port 80 on IIS 7.5.7600.16385.  When I run the following line in logo.html the gif is properly displayed:

<img src="../images/logo_c.gif" alt="Orange Whip Studios"/>

When I run the line in logotest.cfm the alt text is displayed, even though FileExists finds the gif at that path.  Any idea why?  Thanks.

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 13, 2011

    Are logo.html and logotest.cfm in the same directory?

    July 13, 2011

    Yes.  Same directory.

    Inspiring
    July 13, 2011

    The URL in an IMG tag is not relative to the file the tag is in, it's relative to the path in the URL of the mian request (ie: in the address bar of the browser).  I suspect "../images/logo_c.gif" is not valid, relative to the address in the address bar..?

    --

    Adam