skip to Main Content

how can we add image from our C/D drive directly into html file without bringing it to that html file/folder??is it possible or not

how can we add image from our C/D drive directly into html file without bringing it to that html file/folder??is it possible or not

that if their is way that i can add file let say present in "C:UsersOMKAROneDriveDesktopmemoriesIMG20221004055341.jpg" can we include it in our html file without bringing it in that folder where html file is present.

2

Answers


  1. You should be able to simply do it like this:

    <img src="C:UsersOMKAROneDriveDesktopmemoriesIMG20221004055341.jpg"/>
    

    Since the file isn’t in the same folder, you just have to use the absolute path of the file!

    Login or Signup to reply.
  2. This will only be possible if this image is only loaded locally on your machine via the absolute path as in the example below

    <img src="C:UsersOMKAROneDriveDesktopmemoriesIMG20221004055341.jpg"/>
    

    If not, you’ll need to copy it to the server where the HTML file is hosted and include the folder path as usual.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search