-4

I am trying to load an image which is there in my local system.

if i give path "C:\Mashreq\BGImages\Jellyfish.jpg" it's not loading.

Getting error file:///C:/Mashreq/BGImages/Jellyfish.jpg not found in network.

Please check the below code.

<img ng-src="C:/Mashreq/BGImages/Jellyfish.jpg" class="img-responsive" style="width:100%" alt="Image">
  • 1
    `C:/Mashreq/BGImages/Jellyfish.jpg` is not valid. You should serve assets through `http` or `https` protocols... you can serve files from `file://` but this will work only for your machine... – Hitmands Aug 31 '17 at 11:13
  • possibly you must look at this -> https://stackoverflow.com/a/4090736/5323912 – N1gthm4r3 Aug 31 '17 at 11:13
  • 4
    Possible duplicate of [Why can't I do ?](https://stackoverflow.com/questions/4090712/why-cant-i-do-img-src-c-localfile-jpg) – Hitmands Aug 31 '17 at 11:14
  • https://stackoverflow.com/a/37223277/8317956 –  Aug 31 '17 at 11:17

1 Answers1

-1

Please check the permission for that directory.

In your case you are using "C:/Mashreq/BGImages" folder path. Please make sure you have access for that path or that image.