Image is not displayed in Internet Explorer 11 - html

I am using an URL in src of img tag of HTML to display the image, it works fine in Chrome but in Internet explorer it is a broken link.
This is how the URL looks like,
https://AAA.visualstudio.com/_apis/wit/attachments/72651f99-6fb6-4297-94a5-dfff1c5e94b9?fileName=vsts.png
I am guessing, the filename at the end is causing this issue, if its the case what is the solution for this.
Sample code:
<!DOCTYPE html>
<html>
<body>
<img src="https://AAA.visualstudio.com/_apis/wit/attachments/72651f99-6fb6-4297-94a5-dfff1c5e94b9?fileName=vsts.png">
</body>
</html>
If I use the same URL to view, it displays the image properly.
EDIT: It looks like the internet explorer is not passing the session details like authentication, so the response I am getting visual studio is Sign in page instead of image data.

You can probably see the image in the browser because you are logged into a Microsoft account and therefore have access to the image. To make your html able to access this image you need to make your hosting server log in to that Microsoft account.

Related

Why Firefox does not show pictures of my web?

I have an issue with web I am developing HTML/CSS (only design), if I open it in firefox from my harddrive no pictures are displayed, there is a small icon instead like picture can not be loaded. If I rightclick on a icon and select open picture in new tab than picture is displayed on a new tab without issue.
But if I open webpage from my hardrive in IE, edge or chrome than all pictures are displayed directly on a page in a browser without issuel.
What can be wrong with mozilla or with page?
I tried all these recomended fixes: https://support.mozilla.org/en-US/kb/fix-problems-images-not-show.
this is picture URL: img src="D:/UserData/z003xner/Documents/My Web Sites/bubabikes/Images/30.1.2023.jpg" and i tried forward slash and bacward shash and nothing helps
Try to put the image inside the project folder for eg : {project_path}/images/1.jpg and call the image using the domain name in the project suppose the project domain is https://example.com call the image using
<img src="https://example.com/images/1.jpg" class="image" />
or if in localhost :
<img src="http://localhost/project-name/images/1.jpg" class="image" />
It’s hard to tell, but the issue may be the spaces in your file path — try replacing them in your html with %20 like this
my/file%20path%20has/spaces.jpg
You can look up “url encoding” for more information!

Why do images display in raw file URL, but NOT in html display using Chrome? Other browsers are fine

As of October 1, images that are hosted on our server, will NOT display in Chrome for any users when the image is trying to display in html. It works fine in all other browsers. If I paste the exact URL of the image file in the browser, the image works.
example:
This image displays fine here if I paste into my browser:
http://example.com/email/2020/09/file.jpg
But, when the image is included in an html page, the image does not display. i.e. in a webpage, the images show up as missing.
I've discovered that images from other servers work just fine. Why would one server work and another not. I'm trying to get an answer to our I.T. department to let them know if they need to update something on our servers to fix this issue, or if this is a Chrome issue that Google needs to fix?
Any ideas?
Thanks for your help.

Image not displayed in IE 11.But working in chrome and firefox

In IE 11
when https://localhost:8070/resource/6fbe89333dbd691683c1a781f6ccb828f32f433c/0/S.jpg
I am able to see the image
But when I put this into html
src of img tag in html
The image is not displayed and showing 'X' on screen
pretty hard not knowing the directory of the files , do you store it in a img folder?
I tried to test the issue on my side and found that it is working fine on my side.
Test code:
<!DOCTYPE html>
<html>
<body>
<img src="http://localhost/pineapple.jpg" alt="Smiley face" width="150" height="150">
</body>
</html>
Output:
Looks like you have some issue in your HTML code or issue with some IE settings.
Try to check and verify that the image path is correct and the image is available there.
Check that your HTML code is correct.
Check the console to see whether there is any error or warning.
Check the code using developer tools and see the image related code to find the issue.
If the issue persists then try to post your sample HTML code.
Seems there is an issue with IE only if the actual image format is different than the extension of the file .
The issue happens only with local files, and if you just changed the extension of the image to the actual format eg: gif, it will work
assume test.jpg file is located beside the html file then
<img src="test.jpg"/>
this will not work in IE
if you just change the extension to
<img src="test.gif"/>
then it will work

Image would not like to open in IE10 and Mozilla

I upload image to server and try to load it in different browsers.
I'm using this type of code:
<img alt="Name2.jpg" src="http://www.website.net/addVid/maker/Name2.jpg">
This is result:
Chrome: Working fine.
Opera: Working fine.
IE10: square with cross.
Mozilla: says " The image blablabla.....cannot be displayed because it contains errors.
I have NO idea why it's happens.. any suggestions?
URL provided in src is not valid
src="http://pcplacements.com/wp-content/uploads/Hello-Picture.gif"
once try this.
The link that you provided is invalid however I am assuming that you did not want to post the actual URL for whatever reason.
Why are you trying to load the image via URL, just import the image over to your server and then access it:
<img alt="Name2.jpg" src="FileDirectory/Name2.jpg">
problem is with the image. the image only contains the error, once replace the image and try again, i am sure it will.
Definitely.

Empty IMG SRC trigger logout in IE

I'm developing a web system now, and have debugged a very strange bug just now.
First I describe the bug itself here.
Problem:
When visit http://mysite/, it redirects to login and do logout at once.
There is a page, which url is /site.php?arg1=xxx&arg2=xxx everything is well in chrome, but when I use the ie8, after this page loaded, the account is logged out!
Bug Location:
After a long term of debugging, I found that the point which causing the problem is:
<img class="item_thumbnail" src="" />
If I remove this tag, everything become good.
So I'm wondering: when the <img> tag render, what's its behavior? Will it request the login page? But everything is in mass with ie.
What cause this problem? And what will ie an non-ie deal with the img-src?
Need your help!
As I suspected, according to
Empty image src can destroy your site
Internet Explorer makes a request to the directory in which the page
is located. For example, if you have a page running at
http://www.example.com/dir/mypage.htm that has one of these patterns,
IE makes a request to http://www.example.com/dir/ to fill in the
image.
Safari and Chrome make a request to the actual page itself. So
the page running at http://www.example.com/dir/mypage.htm results in a
second request to http://www.example.com/dir/mypage.htm to fill in the
image.
Hit F12 and look in the network tab to see.