I recently installed ColdFusion 2021 (Developer edition) on a Windows 10 workstation.
I am using the built-in web server (port 8500) under: C:ColdFusion2021cfusionwwwroot
I created a folder called “newSite”
within the newsite I have a folder called “images” — newsiteimages
If I go to http://127.0.0.1:8500/CFIDE (everythig works GREAT and CF related images are shown)
If I go to http://127.0.01:8500/newSite/index.cfm (which has an image referenced as: /newSite/images/myimage.png)
The image does not show and when inspecting the document it states :
Failed to load resource: the server responded with a status of 404
(The requested resource [/newSite/images/myimage.png] is not available) (even though the image is in fact present.
Is there some setting or something I am missing???
Suggestions:
1) Verify whether the file extension is JPG or PNG
2) Check the directory structure:
/wwwroot/newSite/index.cfm
/wwwroot/newSite/images/myImage.png
3) Use the image full URL or URL relative to the location of index.cfm
<!— index.cfm —>
<img src=”http://127.0.0.1:8500/newSite/images/myImage.png”>
<!— two alternative relative URLs —>
<!— <img src=”images/myImage.png”> —>
<!— <img src=”/newSite/images/myImage.png”> —>
I’ll note that when using the built-in web server, urls (and files and folders those refer to) are indeed CASE sensitive. Are you sure that the /newSite/images/myimage.png file you refer to is in fact identical in the URL you use as in the file system? BTW, try it both in a browser, and of course check your img src tag if that fails though your browser test works.
That would return a 404 error as it does not exist as the path is in fact in /newSite/images/myimage.png
The site comes up as: http://127.0.0.1:8500/newSite/index.cfm just NO images will display.
You must be logged in to post a comment.