Image not showing in Firefox but ok in IE

15 03 2011

Last year I spent many hours trouble-shooting a website with an image that was OK in IE, but not visible in Firefox. I looked everywhere in the HTML and CSS to fix the mistake but to no avail.

Anyway, last week when a colleague encountered the same problem and also spent a long time trying to find the solution online, I thought it would be useful to share this very simple fix I discovered on my trouble-shooting journey.

When naming your images DO NOT use a hyphen or an underscore in the name of the file – e.g. image-file.jpg or image_file.jpg. There may also be problems naming files with spacial characters, but I have not tested this extensively so it is up to you to test that theory.




One response

25 10 2012
Jason Collin (@jasoncollin)

I had the same problem as I compose blog posts in Safari then when looking at them in Firefox (both on a Mac) sometimes the images do not appear in Firefox. I finally just realized maybe it was because the filenames for the photos were too long, as shortening fixed it, but maybe it was the combo of length and multiple hyphens in the names.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: