1 Reply Latest reply on Feb 8, 2008 5:07 PM by QueryDawg

    Relative Image Paths in CFDOCUMENT

      Hi Everyone,

      Why can my Dev Box read relative image paths inside a CFDOCUMENT tag, but my Production Box cannot? and how can I get my Production Box to read them?

      This only works on Dev: <img src="/myRelPath/myImage.gif">
      This works on both Dev and Production: <img src="file:///D:\myAbsolutePath\myImage.gif">

      I need to be able to use the relative syntax on Production because I'm using <CFIMAGE action="writetobrowser"> inside the CFDOCUMENT. This means the final <img> tag is being rendered with a relative path and I have no control over the SRC attribute.

      One options I have thought about is to wrap a <cfsavecontent> around the <cfimage> tag, then replace() the relative path with the absolute path.... but since the PDF content is in a dynamic loop, that can end up being a lot of overhead. I would rather just be able to get CFDOCUMENT to recognize relative paths on my production box...

      Any Ideas?