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
6,003 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,840 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
1,451 views
0 votes
0 answers

How to hide image broken Icon using only CSS/HTML?

I need to hide this error image/ ...READ MORE

May 27, 2022 in HTML by Tejashwini
• 3,820 points
634 views
0 votes
0 answers
0 votes
2 answers

How to play video in react.js using html video tag?

This is a solution: import Video from "..Videos/video1.mp4" class ...READ MORE

answered May 21, 2023 in HTML by Renie
7,246 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
1,209 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
10,540 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,740 points
829 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,240 points
726 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,840 points
4,833 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,840 points
789 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP