Images with Virtual File System

I’m trying to pull an image from the virtual file store and use it directly in a web page… I must be missing something because I just can’t get it to work…

I’ve set up the mapping in Application.cfc -

this.mappings["/ram"] = "ram://";

and I’m using an include to test that the mapping is working -

include "/ram/susi.txt";

Everything works. When I use the include for the image file there is data there only not an image, as expected…

include "/ram/printFiles/Minvoicelogo1.jpg";

However when I try
<cfoutput> <img src="/ram/printFiles/Minvoicelogo1.jpg"> </cfoutput>

Nothing happens and I get a broken link on the actual web page. I’m obviously not getting the ram part processed on the web page but Lucee is parsing the page and producing output. Do I need to convert the file at all?

Any thoughts?



Try this

img = ImageRead('[](')

Thanks - That sorted it…

Always used the filesystem rather than the ram system! I’ll use the ram more now…