Jump to content

Making an image yours


thewindmaker

Recommended Posts

Hi,If I have made say a map or photoshop wallpaper for my site and I want it to have the adress such as. justzelda.zeldacentral.net/triforceanimation.gif . is all the i have to do is save the file to the CGI folder in my ftp program. then use this coding?

 <img src="justzelda.zeldacentral.net/triforceanimation.gif">

cause its not working for me... do i have to make it a directory or something?The image isn't showing up its just a box with a red x through it.or should it be this coding?

    <img src="triforceanimation.gif">

Thanks

Link to comment
Share on other sites

He means.. he put the image in the cgi folder (way wrong folder buddy, its for active scripts like a login page :)) and when he tried to put it in an image tag it wont show up.. try it with the /cgi directory in it :)

Link to comment
Share on other sites

Why are you uploading images to the cgi-bin directory anyway? That's not what that directory is for. Just make an 'images' directory or something like that, and put it there. The problem is your path, I don't know how to teach someone how directory paths work, I think it would be pretty obvious. If you have a folder called images in the root directory of your web space, then you can point to your images by justzelda.zeldacentral.net/images/image.jpg or whatever. And keep in mind that if you are specifying the domain name in the path, you need the protocol also (http://). If you leave that out, the browser will look for something like this:

But if it is a relative path, then you don't need that. If you are pointing a file in the root to the image, all you need is this:images/image.jpgor/images/image.jpgRight now the image on your page has this address:http://justzelda.zeldacentral.net/justzeldalogo.jpg/cgi-binand that doesn't even refer to an image, it refers to a directory called cgi-bin inside a directory called justzeldalogo.jpg inside the root directory.
Link to comment
Share on other sites

You really need to get a good handle on directories and paths if you are going to be doing web development. Take this for example:images/affiliatesmenu.tifThis looks for a file called affiliatesmenu.tif in a folder called images that is in the same folder as the file that references it. So if you have this file:

The file somepage.html is in a folder called "pages", which in turn is in the root folder of the mysite.com domain. If that page has this code on it:<img src="images/image.jpg">That means that it is referencing a file called image.jpg inside the images folder, and since there is nothing before "images", that means that the images folder is in the same folder as the HTML file (the pages folder). So it is looking for this image:
So, assume you just have this:<img src="image.jpg">That is looking in the same folder as the page that refers to it. So, using the same example HTML page, it would be looking for this file:
If you want to look above the folder you are currently in (you are in mysite.com/pages, and you want to look in mysite.com/) you use this:<img src="../image.jpg">The parent directory qualifier (../) looks in the parent directory (one level up). You can stack them. This:<img src="../../../image.jpg">looks 3 levels up from the current page.All of these examples are called relative paths, they look in a path that is relative to the current page. You can also use an absolute path:<img src="http://mysite.com/pages/images/image.jpg">This will always look in the same place, no matter where the page is that refers to it.Or, you can just refer to the root of the server itself like this:<img src="/images/image.jpg">That slash before the "images" folder tells it to start at the root. So that is equivalent to this:<img src="http://mysite.com/images/image.jpg">Since mysite.com is the root, it starts there and looks in a folder called images.Also, as a side note never, ever use a TIFF image as a web image. TIFF images are uncompressed, and are typically pretty massive in size. If you have a TIFF image that is a 24-bit image, meaning that there are 8 bits each for red, green, and blue for each pixel, and assuming that the image is only 100x100 pixels (for 10,000 pixels total), that means that the uncompressed file size of that image is 240Kb (24 * 10,000). That is an enormous size for 100x100. A banner that is 800x100 would be almost 2Mb. JPG, GIF, PNG, and any other sane format uses compression. Do not use BMP either, BMP files are also uncompressed.
Link to comment
Share on other sites

K well, either I am a complete idiot or I am doing some thing very wrong... Here is picture to help show what iam doing exactly. This picture is showing the main folder/directory that opens up when you open the ftp server.zzzz15oy.jpgThis is a picture of what it looks like when you open up the Image folder that you saw in the first picture. zzzz22zc.jpgI am trying to have the file justzeldalogo.jpg inside the file index.php. With having to use a image uploader like imageshack or photobukcet.Here is a picture of what it looks like on the site. with these codings.

<img src="../images/justzeldalogo.jpg"><img src="/pages/images/justzeldalogo.jpg"><img src="justzeldalogo.jpg"><img src="/images/justzeldalogo.jpg">

zzzz33lb.jpg

Link to comment
Share on other sites

That will work, and so will the fourth one you posted above. But I would be willing to bet that your server is running Linux, and Linux is case-sensitive. Images and images are not the same folder. JustzeldaLogo.jpg is not the same as justzeldalogo.jpg. You need to be consistent, you probably just want to keep all filenames lowercase, it makes it easy.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...