Images not showing

Status
Not open for further replies.

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
No images are displaying on my site, it just shows their alt text.
They were working before and then they just disappeared. The files are definitely there and in the right place with the right links to them.
Why aren't they showing up though?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
The system does not show a Free Hosting account attached to this forum account.

URL? Domain name?
 

Anna

I am just me
Staff member
Messages
11,733
Reaction score
578
Points
113
One thing you'd need to be aware of is that the servers here are running linux, which is case sensitive, so image.jpg would not be the same as Image.jpg, case is important, check your code so the spelling in your code match the spelling on he file(s). This is by far the most common reason for images not showing up properly; misspelling or mismatching case between code and file.
 

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
zombiesim.net is the domain

I haven't touched the code though. At least not the images.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Could you check any .htaccess files in either your document root or in /images ?
 

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
There's an .htaccess in the root. What exactly in it would I be looking for?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Some sort of rewrite code.
Post here between CODE tags and we can point out any problems.
 

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
Code:
RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.zombiesim.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.zombiesim.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.zombiesim.x10.mx/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.zombiesim.x10.mx$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zombiesim.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zombiesim.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zombiesim.x10.mx/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zombiesim.x10.mx$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

I'm not familiar with .htaccess, so I'm not really sure what it means, but let me know if there's anything in there that might be contributing to this ^^

Just looked in chrome and it's giving me this:
Failed to load resource: the server responded with a status of 404 (Not Found) http://zombiesim.net/images/banner.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://zombiesim.net/images/backtotophand.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://zombiesim.net/images/banner.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://zombiesim.net/images/backtotophand.png
 
Last edited:

gomarc

Member
Messages
516
Reaction score
18
Points
18
Hi qwigoqwaga,

Do you have a copy of your image files somewhere? Who knows why, but for some reason they are all showing as 0 (zero) size at the server. Try uploading your image files to the server again and this may fix your problem.
 

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
I've reuploaded them multiple times now. It hasn't helped D:

If I go through the file manager they're there and correct and the correct size.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I've located the problem; the .htaccess is perfectly fine, your permissions are not.

The images subfolder was set to 544 - this is just low enough for it to prevent the browser from seeing what's inside the folder (hence the 404). I've added the execute permission to Group and World, leaving it as 555 - the images now load as intended.

I'll be honest, I'm not super familiar with permissions so I can't shed any light on exactly why 544 wasn't working, but I know on folders a lot of CMS's prefer 755, so if it's working with 555 I'd say leave it for now. If it starts giving problems later, try 755 and see if that makes a difference then :)
 

qwigoqwaga

New Member
Messages
9
Reaction score
0
Points
1
Thank you very much :D

I'm not familiar with permissions either so I wasn't sure what they should be set at ^^'
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
A general rule of thumb for most web hosting related permissions:
Folders = 755
Files = 644
 
Status
Not open for further replies.
Top