<img src="... not always working!
On my website I have several images showing, depending on the page.
The images are not locally stored, the html img tags reference remote servers.
The problem is that they don't always show.
Ive tried putting a random "?rand=123" value in the URL to prevent caching - no success.
If I copy the image links to another browser tab they show up and then refreshing the first page, the images come up immediately.
can someone please help?
With regards, S.Einarsson
Probably my lack of coffee intake at this point, but I don't understand the problem clearly enough to offer help.
Ryan Butler : thanks, I have some <img src="..... tags on my webpage which are supposed to display images. sometimes the images show and sometimes they dont
I´d like them to show all the time obviously , thats the problem
Kiwibrit: thanks, well if I take the image link and paste it in a new browser window the image displays fine!
Ive checked a "hotlink check webpage" and it said that the image were not hotlink protected. This tells me to perhaps still avoid hotlinking because thats what ive been doing but on the other hand if the problem is not because of that which it seems it wasnt, the problem will remain, hotlinking or not hotlinking.
Last edited by sigein; 10-12-2009 at 10:16 AM.
OK first let me understand how to exactly use this forum
First how do I post my questions
Second is there an option where I can do this
Third and most important I need help with my web I'm developing in Notepad I want to write in my own html and I'm having problems with the img, I try to load in my photo from my desk top file with the tag <img scr=> plus the height and width but the only thing I see when I launch it is an empty square with a pic of a broken icon
what I'm I not doing right
It could be a couple of things. Post a link to the offending page and we'll take a look.
Hey Charles TK you for your quick response to my post
OK I can not give you a link for the page I'm creating it still in production mode
I also have not gotten hosting site to place it in I though to learn how to write the codes first then do every thing else
Are this realistic steps to take or do I really need to have a hosting account plus domain to develop my site?
You can develop quite well without the hosting, but you might not catch all the problems that way.
In lieu of seeing the patient I'll refer you to The Validator.
The src attribute in your img tag must point to the relative path of the image.
Originally Posted by elnewbie
For example, if I had a HTML file that I saved in a folder (called "website") on my desktop that had this in it:
Then some_picture.jpg would be the image file. It would be located in the website folder, in a subfolder called images, and inside the images folder in a folder called pics and in the pics folder, there would be the file some_picture.jpg.
Alternatively, I could put this in my HTML file:
In which case some_picture.jpg would be an image file located in the same directory as the HTML file.
Thanks dude I hope al is well
Right I do have an html folder name webdesign I've try to move the photo there int o a sub directory name html/my pic.jpg an it did not copy over
aj nsc the scientist
if you can't copy an image file from one place to another on your harddrive, then trying to get it to display in a webpage is the least of your worries....sorry.
OK but I'll get better that's for sure I thought that this was the place to inf
Don't misconstrue what I said. This IS the place to find info.....about web development.
The src attribute of the img tag must point to an image file RELATIVE TO THE DIRECTORY THE HTML FILE IS IN! Right now, you can't even move your image file around on your computer (for whatever reasons), you're going to have a heck of a time trying to develop websites if you can't move files around.
For example, I have files as below:
In index.html, I would have to use
in order for the image to show up.
I would have to use:
The ../ indicates the path to the image first goes up one level.
Along these same lines if I had this:
I would have to use the following in my index.html:
Now that little primer should explain what the src attribute of the img tag actually does and give you a better understanding of how to use it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread