FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Problem with Images





NjRocket
Hey guys, when you go to my site www.topsportlinks.frih.net the images like the banner and icons below it all show up. The background as you can see is also black. But heres the problem when you go to www.topsportlinks.frih.net/videos/danecook.html the none of the images or the background show up, but when you look at the script, the images are in the same directory as they were in the index file. If i place the video (danecook.html) in the public html, it works, when i place it in the videos folder, everything goes down Sad. So if someone can help me out here, that would be awesome thanks alot.
Hobbit
Do you have an "images" folder in your videos directory? I took a look at your code, and the images are pointing to your root/images.
NjRocket
thank you, that worked, i didnt know i had to have the images folder in each new folder, learning here, thanks again.
Hobbit
You don't necessarily have to have them in the same folder, you can just point to them. Instead of the code being 'images/whatever.jpg' it would be "http://www.yoursite.frih.net/images/whatever.jpg", I'm pretty sure that would work, although I've never tried it.
NjRocket
I'll just keep it how it is now, don't fix what ain't broke lol
photographerguy
Hobbit wrote:
You don't necessarily have to have them in the same folder, you can just point to them. Instead of the code being 'images/whatever.jpg' it would be "http://www.yoursite.frih.net/images/whatever.jpg", I'm pretty sure that would work, although I've never tried it.


Yes it does work if you put the whole address (http://www.xxxxxxx.xxx)
in the code. I just make a folder called images or assets and point all my pages to it. My links (from anywhere on the site) would be images/xxx.jpg, .png, .gif, etc
NjRocket
photographerguy wrote:
Hobbit wrote:
You don't necessarily have to have them in the same folder, you can just point to them. Instead of the code being 'images/whatever.jpg' it would be "http://www.yoursite.frih.net/images/whatever.jpg", I'm pretty sure that would work, although I've never tried it.


Yes it does work if you put the whole address (http://www.xxxxxxx.xxx)
in the code. I just make a folder called images or assets and point all my pages to it. My links (from anywhere on the site) would be images/xxx.jpg, .png, .gif, etc


yea. i'm not sure if its worth it to change back to that. As of now, i have an images folder in each directory, is it worth changing back you think or no?
IceCreamTruck
Here's a clue!! You are limited in how much space you have!! Don't copy images over and over when it's your code that is wrong. There are two types of ways to point to a file, and yes you should ONLY have one image directory.

The two ways to point to a file are "relative" to the file that is calling the image (e.g. SRC="filename.jpg" files in same directory on server, note no HTTP://) and "litteral" (e.g. SCR="http://mysite.com/images/filename.jpg" doesn't matter what file on the whole internet calls this image because it has nothing to do with the directory containing the file that needs the image. Don't use relative calls for any images on your site. nuff said. Use all litteral (e.g. once again <IMG SRC="http://mysite.com/images/FileName.jpg">)

What are you going to do when you have copied your images folder all over your website and you need to put a new image up. Are you going to drag and drop it to many many many new folders? No, you should take the steps now to fix this problem or you will be in a world of hurt later on because you will have to do so much work to update your site.

Fixing the problem your way is not the easy way in the long run, because you are making it much worse for yourself!!!
riv
Instead of typing "http://www.mywebsite.com/images/reallycoolimage.png" or something like that, you can just type "/images/reallycoolimage.png" which would just tell the browser to look in the root directory.
NjRocket
riv wrote:
Instead of typing "http://www.mywebsite.com/images/reallycoolimage.png" or something like that, you can just type "/images/reallycoolimage.png" which would just tell the browser to look in the root directory.


the second option is what i use to have, which resulted in me placing an image folder in every sub folder, which was taking away from tmy limited storage.
Hobbit
I'm glad you fixed it, it will surely save some space, save you time, and it looks more professional.
NjRocket
Hobbit wrote:
I'm glad you fixed it, it will surely save some space, save you time, and it looks more professional.


yea, saving the space and looks a lot better to visitors, should've started it like that, learn from the past i guess lol. Thanks again.
bgbg
By the way, your site is pretty nice.
NjRocket
bgbg wrote:
By the way, your site is pretty nice.


Thanks, I still got some stuff I got to add around the site, nowhere near finished. Join up on the forums, www.topsportlinks.frih.net/forums/ , and start to get involved in the community.
Related topics
wont load images
phpbb problem....
problem with images NOT showing up, plz help...
Not a real problem, just a funny thing about Fantastico...
[RESOLVED] Images not showing up
ASP Problem
Positioning images with HTML
Memory problem!
phpbb problem again
PHP problem...
Problem with Images
Problem with avatar
can't see images
HTML file paths
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.