I am making a web application using ASP.NET and I noticed that only Internet Explorer loads images properly that are on my home computer (../Desktop/WebsiteImages/xxxx.jpg), whereas the images won't load on Chrome or Firefox. If I want the images to display on Google Chrome or Firefox, I have to upload the images on a web hosting site such as imgur instead of having them all on a file on my computer. Is this a known bug?
If I want the images to display on Google Chrome or Firefox, I have to
upload the images on a web hosting site such as imgur instead of
having them all on a file on my computer. Is this a known bug?
It is not a bug.
Web Server will never serve a file which is located outside of a web application (unless you create an image handler by yourself).
If you are new to web application, easiest way is to place images inside ~/images/ folder inside your ASP.Net application.
Then you can call the image like this -
<img src="#Url.Content("~/Images/MyImage.jpg")" alt="My Image"/>
showing local file like file:// is not allowed in Chrome and Firefox for security reasons by default, but this answer shows you how to change those settings. it's not recommended to use local filepath for your image
Related
I was trying this code :
Link 1
Link 2
But It is not working in Google Chrome or Firefox Browser.
If you open your browser's console, you'll see an error like this:
Not allowed to load local resource:
This is intentional. Chrome blocks local file access this way for security reasons. There are of course ways to get around it
This links will load on your browser.
You don't have access to local strongs.
This is web!!!!we work on browser only(with upload files too!)
we have access to directory in python,c,c#,c++,java,ruby,delphi,visual basic,....
I have an Angular 4 front-end application accessing images that are stored on a private S3 bucket. The images are only accessible via an authenticated API call. An example image url would be https://my-app.com/api/aws/s3/download?key=banner.jpeg.
When I am on a page such as https://my-app.com/#/ (I am using hashbang for the urls), I can see the image I want with the following img tag: <img src="/api/aws/s3/download?key=banner.jpeg" /> in Chrome and Firefox.
However, in IE11/Edge, this doesn't work. Using the absolute link instead of the relative one also does not work in IE/Edge.
I do have a base href set up as ./ in my index.html, but this is for my Tomcat server to load my Angular app.
Any thoughts as to why I can't get the image to load?
edit (7/17/17 at 2PM): I see an aborted message in the network tab for IE's dev console for each image. Could this be a SSL issue? Why would Chrome and FF be fine.
I have an ASP.NET Webpages Razor syntax VB.NET Website.
I have recently added in the feature to upload images with great success.
However when viewing the image on the website any picture is upside-down!
The original files are of the correct orientation however upon viewing through the website using the <img> tags I get the issue.
I have one other static image in my site and this is not flipped. It is only the files that I upload. Even files downloaded from the internet and uploaded come out on the page as upside down!
So right now I am using:
<img src="/Docs/Events/1676/image1.JPG" height="400" width="400">
Using developer tools through chrome I can request the image directly. This shows the image correctly!
Any suggestions how I can fix this?
Thank you
I am creating an iPad app, using HTML5 and PhoneGap. I am wanting to put an iframe into a page and pull through some content in a php page found remotely on our server.
I have set the correct ExternalHost in the PhoneGap.plist file so that it will accept the external domain.
If I tell the iframe to access a .html page (on the server), it works perfectly - However if I change the extension to .php I get a blank iframe.
This is all while testing the app directly on the iPad and the IOS Simulator.
Could anyone suggest anything I have missed out?
I have a web application.
I have inserted an image into my web application homepage using html tags.It is working very well in server machine. But when any client is accessing my web page everything that is present in the homepage of the web application is displayed except the image. Instead of image cross mark is displayed in client machine.
Can anybody help me how to display the image in client machine.
Check the path in the src attribute in the img tag. Make sure it's a relative path, and not hard coded to path on your hard drive.