Skip to main content
Known Participant
November 12, 2011
Question

Some images not displayed on localhost

  • November 12, 2011
  • 1 reply
  • 1615 views

I just recently installed CF on my own computer as localhost with Apache.  When I call a Coldfusion page in http://localhost/main.cfm it will show the text and some images.  However, it will not show all the images.  All the images are stored under the local htdoc/images, which should be http://localhost/images/myimage.jpg.  The weirdest thing is that some small images are being displayed while the larger images are not being display in the main.cfm  They are all being called the same way e.g. <IMG SRC="images/myimage.jpg"> or <IMG SRC="images/myimage2.jpg"> etc.  Does anyone know why this is happening? 

Also if I reference it directly http://localhost/images/myimage.jpg etc on the browser, it will display an error message that says "The image http://localhost/images/myimage.jpg" cannot be displayed because it contains errors".  This happens to most images.  The images will display on live site when I uploaded.  So I am totally puzzled.

This topic has been closed for replies.

1 reply

Charlie Arehart
Community Expert
Community Expert
November 16, 2011

Since you’re using Apache, are you also using Linux (or OS X)? If so, note that those are case-sensitive. Make sure that’s not what’s tripping you up. Also, you can check your apache access logs to see what’s happening to the requests that it received, whether for image or other files. It will show the status code. Maybe they will show being 404 errors. You may also want to tight-click on an image, and choose to copy the image link, then past that in your browser and see what it may show. You may see errors there that you are NOT shown when the image is requested from within a page.

/charlie

/Charlie (troubleshooter, carehart. org)