| | |
windows 7 not showing images in html file
Thread Solved |
•
•
Join Date: Aug 2009
Posts: 17
Reputation:
Solved Threads: 0
hello everyone, i have a new pc and it runs on windows 7, and i never had this problem with my other xp pc, everytime i create an html file with images (i have tried jpeg, gif and png so far) only png shows up and not jpg and gif, i need to solve this problem, i have tried to disable my security software and still nothing happned, this happens to both firefox and ie 8. is anyone experiencing the same problem? have you found a solution? what could be causing this? please help, i cant go on webdesigning without it
Last edited by expertotech; Oct 16th, 2009 at 11:14 am.
0
#2 Oct 17th, 2009
Hey.
How exactly are you adding these images to your HTML?
What are the file paths you are using?
I can't imagine that this has much to do with the OS itself. More likely something like an extremely over-protective AntiVirus, broken browser plugins, or just a typo in the HTML.
How exactly are you adding these images to your HTML?
What are the file paths you are using?
I can't imagine that this has much to do with the OS itself. More likely something like an extremely over-protective AntiVirus, broken browser plugins, or just a typo in the HTML.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
0
#5 Oct 17th, 2009
•
•
•
•
When in IE8, have you tried enabling the Compatibility Mode (broken page icon next to the refresh button)? That may help.
Feran
Internet Explorer Outreach Team
Try running it through the W3C Markup Validation Service and fix whatever problems it reports.
By the way, are you opening your HTML page via a HTTP server, or are you just opening them of your hard-drive?
If it is the former, this could well be a configuration problem in your HTTP server.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
•
•
Join Date: Aug 2009
Posts: 17
Reputation:
Solved Threads: 0
0
#6 Oct 18th, 2009
•
•
•
•
When in IE8, have you tried enabling the Compatibility Mode (broken page icon next to the refresh button)? That may help.
Feran
Internet Explorer Outreach Team
yea, it solved the prob in ie8!!! but what about firefox? its still not showing up in firefox, (its being replaced by a broken page too, but i dont think firefox has compatibility feature mode) how do i fix this with firefox? and why is it only not showing jpg and gif with the offline html? it shows all image types on the internet..
0
#7 Oct 18th, 2009
•
•
•
•
yea, it solved the prob in ie8!!! but what about firefox? its still not showing up in firefox, (its being replaced by a broken page too, but i dont think firefox has compatibility feature mode) how do i fix this with firefox? and why is it only not showing jpg and gif with the offline html? it shows all image types on the internet..
Like I say; it could be a problem with your HTML.
Internet Explorer renders HTML and CSS incorrectly, thus; invalid HTML/CSS will sometimes work in IE whereas it will not work in browsers that render it as it should be rendered. (Firefox, for example.)
IE8 is *more* standards compliant then IE7 was, which would explain why it doesn't show the broken markup like IE7 did.
Show us the HTML, and CSS if you use that. Maybe we can spot the problem.
Even if it is not a problem with the code itself, we might be able to spot the actual problem.
Last edited by Atli; Oct 18th, 2009 at 10:14 pm. Reason: Clarifying.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
•
•
Join Date: Aug 2009
Posts: 17
Reputation:
Solved Threads: 0
0
#8 Oct 18th, 2009
ok here's my code, i made it simple but still wont show the jpg
the path is correct from my local drive...
<HTML> <HEAD> </HEAD> <BODY bgcolor="#0080CF" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> <img src="C:\Users\SonnyDajAlexa\Desktop\test\smiley.jpg" alt="test" border="0" > </BODY> </HTML>
the path is correct from my local drive...
0
#9 Oct 19th, 2009
Ahh ok.
In the past, you could have achieved this by doing
By default, browsers use the HTTP protocol to fetch files, and from their point of view, asking for
So you need to tell the browser you want a local file, and you do that by adding
However, this is no longer allowed, as it poses a security threat. (See the next post also!)
Trying it in Firefox 3.5 gives you a "broken-image" icon and an error message in the log:
And even tho IE doesn't give you any indication of a security issue, I am assuming it blocks the images for the same reason.
What you need to do is use a relative path.
By which I mean; place the images in a folder close to the HTML file and use a source like
In the past, you could have achieved this by doing
src="file:///C:/path/to/file.ext" .By default, browsers use the HTTP protocol to fetch files, and from their point of view, asking for
src="C:/Users/..." is the same as asking for src="http://example.com/C:/Users/..." .So you need to tell the browser you want a local file, and you do that by adding
file:/// in front.However, this is no longer allowed, as it poses a security threat. (See the next post also!)
Trying it in Firefox 3.5 gives you a "broken-image" icon and an error message in the log:
text Syntax (Toggle Plain Text)
Security Error: Content at http://atli-desktop/test/imgtest.html may not load or link to file:///C:/Users/Atli/Desktop/test/smiley.jpg
What you need to do is use a relative path.
By which I mean; place the images in a folder close to the HTML file and use a source like
src="images/myImage.jpg" , where the folder structure looks like:test/
htmlfile.html
images/
myImage.jpg Last edited by Atli; Oct 19th, 2009 at 1:40 am. Reason: Clarifying.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
0
#10 Oct 19th, 2009
As an afterthought...
The previous post was written assuming you were using a HTTP server, and using a URI like: http://localhost/file.html
The
The security risk I was talking about doesn't apply to files opened in this manner. (As far I as I know, at least.)
The previous post was written assuming you were using a HTTP server, and using a URI like: http://localhost/file.html
The
file:/// paths should work fine if you open the HTML file directly from the hard-drive, like: file:///C:/webroot/file.htmlThe security risk I was talking about doesn't apply to files opened in this manner. (As far I as I know, at least.)
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
![]() |
Similar Threads
- Combining CSS and Javascript files into single HTML file [HELP NEEDED] (JavaScript / DHTML / AJAX)
- Calling a function in html file from c# code (C#)
- html:file Problem (Java)
- Why can't i test my html file (JSP)
- saving .html to .doc not showing any images (HTML and CSS)
- mailing html file (PHP)
- Help!! Applet only works in AppletViewer but not in html file with <applet> tags!!! (Java)
- IE hijacked-> res://sp.html#96676 (Viruses, Spyware and other Nasties)
Other Threads in the Windows Vista and Windows 7 Forum
- Previous Thread: Need help reformatting a disk
- Next Thread: Help to get o.s selection menu during startup .
| Thread Tools | Search this Thread |
.net 0s 7 adamsmith advertising almostthrowingmylaptopoutofawindow android apple application azure ballmer beta billgates blackberry blog blue choose chrome cloudcomputing code computer cq60 desktop development directoryinformation directorystructures downloads drm economy error flash freeze gartner google hoax hp ie7 internetexplorer iphone licensing linux livehotmail mac marketshare merger michaelarrington microsoft microsoftwindowsvistalonghornwinfs midori mobile mobilephone mojave monopolies multitouch news operating operatingsystem operatingsystems opinion os osx patch patents pc presario quicktime research russia security securitybulletin seinfeld server sharing smartcard software sp1 sp3 spam steveballmer sua survey system touchscreen treo ubuntu unix upgrade virtual virtualization vista win7 windows windows7 windowsmobile windowsvista windowsxp winhec wpf xp yahoo





