CFIMAGE WriteToBrowser Not Working


New to Lucee and ran into an odd issue. I am using CFIMAGE with the WriteToBrowser action.

<cfimage source="d:\somepath\someimage.png" name="myImage" action="writetobrowser" height="52" />

Verified the file is there, but no output to the browser, nor does it throw an error. Am I missing something?

Thanks in advance.



Hi @alberto,

From your code just remove the name attribute then you’ll see your image on the browser.

As per docs, Name attribute is required for action=“read”. If you dump the name attribute from your code you can see the details of your image that will hold by the name.


Is this an incompatibility with ACF?


Yeah! ACF works fine.


Silently failing isn’t great…


Hi @cfmitrah,

Thanks that worked! Unfortunately, the height parameter in the tag is not being respected. This is the output.

<img src="/lucee/graph.cfm?img=163C25D7-D89B-4932-8B92EBDB9BC21C93.png&amp;type=png" width="512" height="354">

In any case, I will keep playing with it.



Quick update… I tried adding the width parameter as well but that did not help. I also tried the passthrough parameter, which did work. Then, I decided it was better to not resize inline. Instead, I just wrote a script to resize the images en masse. This way I take the need of the inline resize out of play, which leans out the request from a disk IO and processor perspective.

Thanks again!