Copy link to clipboard
Copied
Hi dev, I'm using CF2018. Here I've tried to use writeToBrowser action in cfimage tag. It's working fine while run via webroot but it's not working ( Image disaplyed as blank in browser ) while I'm using virtual host. But both are having same code and running places or differnent.
Here is my sample code:
<cfimage action="read" source="C:\ColdFusion2018\cfusion\wwwroot\download.jpg" name="google" >
<cfimage action="writeToBrowser" width='200' heigth='200' source="#google#" />
Note : I did console on image on the browser my test application & my virtual host application have same value in img tag like below.
<img src="/CFFileServlet/_cf_image/_cfimg-5097624825542879602.PNG" heigth="200" width="200" alt="">
<img src="/CFFileServlet/_cf_image/_cfimg2796608237126268946.PNG" heigth="200" width="200" alt="">
But webroot show the image virtual host not showing the image in browser.
Copy link to clipboard
Copied
There are all kinds of things that can break these "fake" file paths. You might find this helpful:
Dave Watts, Eidolon LLC