Images not loading

I’m having an issue with loading images. I recently added new images but the image doesn’t show up, only the alt shows up. As far as I can tell I have the code correct. Here is an example

<img src="/images/image.png" alt="image" width="33" height="32" />

The code is fine. Yu probably just have a wrong path to the file, or the image file is not there. That path is looking for an image called image.png (all lower case) inside a folder called “images” (all lower case) inside your root folder.

In regards to referencing files in HTML, must we pay attention to things being case-sensitive? Or does this depend whether the site is hosted on an HTML or a Linux server?

[FONT=Verdana]Linux is definitely case-sensitive. I have a feeling Windows is not (I’m sure that’s what you meant ;)), but I’d say you should get into the habit of being accurate and ensuring your file names match to avoid any possible problems. The easiest way is probably to use lower-case for everything - although that offends the grammar-fiend in me when it comes to proper nouns. :lol:

Edit: I’ve just found this on Wikipedia:

In Unix filesystems, filenames are usually case-sensitive. Current Windows filesystems (VFAT, FAT32, NTFS) are not case-sensitive (there cannot be a readme.txt and a Readme.txt in the same folder) but are case-preserving, i.e. remembering the case of the letters. The original FAT12 filesystem was case-insensitive

[/FONT]

Thanks for clearing that up, TechnoBear!

I wonder what would happen if from within Linux on a FAT32 file system USB drive, you made two files–readme.txt and Readme.txt in the same folder–and then tried accessing that USB drive and folder from Windows?

Perhaps I’ll try this using a liveboot Linux CD to see what happens.

[FONT=Verdana]I’ve no idea what would happen, but I’d be interested to find out. :slight_smile:

[/FONT]

ugh good luck getting windows to read that format… even when i think i do everything right it still sometimes doesn’t want to be nice

I just now tried it by doing a live boot with Ubuntu (9.10 if it makes a difference). I made a new file on a FAT32 formatted USB drive, “Readme.txt”. Then I made another new file and failingly tried to rename it to “readme.txt” but got the error

[B]The item could not be renamed.[/B]

The name "readme.txt" is already used in this folder. Please use a different name.

It seems that the reason for this is because the file system itself is one that is native to Windows (like the ones you quoted from Wikipedia: VFAT, FAT32, NTFS). I say this because I then tried the exact above procedure on the local Linux file system, and I was able to have both files, readme.txt and Readme.txt, in the same directory just fine!

[ot]

Thanks for testing that - it’s an interesting result and not what I expected.

Good theory. :slight_smile:

Yep - I know that works, because I once did it accidentally and got myself no end confused. :lol:[/ot]