unable to load image file using img tag

0 votes
I have used the following piece of code to load the image file:

<img src="images/OIP.jpg"/>

The image is in the same root folder and inside images folder. But when a check the code in browser, the image file is not loaded and throws an error : Failed to load resource: net::ERR_FILE_NOT_FOUND

I have verified the page source, and the image is present in the specific path.
Oct 7, 2020 in HTML by Abirami
• 120 points
635 views

1 answer to this question.

0 votes

This error means that file was not found. Either path is wrong or file is not present where you want it to be. Try to access it by entering source address in your browser to check if it really is there. Browse the directories on server to ensure the path is correct. You may even copy and paste the relative path to be certain it is alright.

OR 

Use <img src="images/OIP.jpg"> not as <img src="images/OIP.jpg"/> Remove the / in the path.

answered Oct 7, 2020 by Niroj
• 82,720 points

Related Questions In HTML

0 votes
0 answers

How to do calculation in PHP using a csv file for retrieving data?

Morning, I have a csv file and i ...READ MORE

Feb 11, 2020 in HTML by anonymous
• 140 points
552 views
0 votes
1 answer

How to Identify Web Element( Button) when there are multiple buttons without any ID

Hi Gangadhar, Do you need the HTML code to ...READ MORE

answered Feb 10, 2020 in HTML by Roshni
• 10,440 points
487 views
0 votes
1 answer

I've a query for <form>tag

That might be because button inside form ...READ MORE

answered Nov 2, 2020 in HTML by sindhu
101 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,400 points
276 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
2,377 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,700 points
139 views
0 votes
1 answer

Using Post and Get for Embedded System Communication

Twitter would be a great place to ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
196 views
+1 vote
1 answer

How can i create simple register form using html and css?

Html5 contains lots of elements using which ...READ MORE

answered Jan 31, 2020 in HTML by Niroj
• 82,720 points
2,056 views
0 votes
1 answer

How to align a <div> to the middle (horizontally/width) of the page?

Hello Kartik, position: absolute and then top:50% and left:50% places the top edge ...READ MORE

answered Apr 23, 2020 in HTML by Niroj
• 82,720 points
106 views
0 votes
1 answer