Reputation: 137
I think I am going crazy. I have an IMG tag like this:
<img src="/images/icon-articl.png" alt="xyz" />
All good, image is displayed fine. However I want to name the image icon-article.png instead but for some reason this is not accepted!
<img src="/images/icon-article.png" alt="xyz" />
will only show the ALT text! All I did was make a copy of the image file and rename it accordingly. Doing the same with "icon-articles.png" is fine again! When I enter the full address into the browser's address bar, the same happens, "icon-article.png" results in URL not found while the other images are shown.
What is this??
PS I don't think it matters but I am working on a localhost right now
EDIT: corrected my typo just to make sure that the code itself and filenames are fine. Problem is solved, see below.
Upvotes: 1
Views: 516
Reputation: 137
Okay thanks everybody for your efforts, and sorry, I should have expressed myself better. The code itself was fine, what I gave in my question was only a snippet. Also all the files do exist, I always copied and renamed them.
So thanks EricG for your comment, the cache was the issue and CTRL-F5 solved the problem!
I will rember to do this more often ....
Upvotes: 3
Reputation: 1336
May be icon-article.png images is not a orginal png file if you may be rename file extension it will not supported in IE like browser.
Upvotes: 2
Reputation: 1040
Make sure that when you change the name in the tag that you change the file-name as well. Otherwise it won't work.
Upvotes: 1
Reputation: 10246
<img src="/images/icon-articles.png" alt="..." />
I have appended 's' in image file name. as you named it, mentioned in question.
Upvotes: 1
Reputation: 574
close your alt tag
<img src="/images/icon-article.png" alt="... "/>
Upvotes: 2