I wanted to use an image from my computer in the same folder as the html file. How can i fix this? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I wanted to use an image from my computer in the same folder as the html file. How can i fix this?

Im sure that the name and code is right but it says the image doesnt exist. <img src="mountain.jpg" />

22nd May 2019, 8:03 PM
Marci Mihálka
Marci Mihálka - avatar
8 Answers
+ 3
Alright, well then ... I suggest you to save a copy of the code in your SoloLearn profile, then share the code link on your original question (above), on the Description section. Hopefully with a code to view there can be a solution. In case you didn't know how; see the following post on how to share links. https://www.sololearn.com/post/74857/?ref=app
22nd May 2019, 9:34 PM
Ipang
+ 2
Does the picture load if you view the page directly from a web browser?
22nd May 2019, 8:50 PM
Ipang
+ 2
How about testing the code by using another image file? change the src to another file's name and see if the image loads correctly. Also try to open the image file from Explorer, does it show up? if it doesn't, there might be a problem with the image file itself, it might be corrupted.
22nd May 2019, 9:24 PM
Ipang
+ 1
Are you opening the page on your computer or from SoloLearn Playground? if you're opening the page on your own computer it should be fine ... but if you saved the page in SoloLearn it won't work. Read the following discussion, it might help to solve your problem 👍 https://www.sololearn.com/Discuss/1054246/?ref=app
22nd May 2019, 8:44 PM
Ipang
0
I didnt mention that im using notepad++
22nd May 2019, 8:45 PM
Marci Mihálka
Marci Mihálka - avatar
0
It doesnt
22nd May 2019, 8:51 PM
Marci Mihálka
Marci Mihálka - avatar
0
I've already tryed with several images. The pic can be edited in notepad++. When opening it from the code it says the file doesn't exist.
22nd May 2019, 9:28 PM
Marci Mihálka
Marci Mihálka - avatar
0
Thanks
22nd May 2019, 9:43 PM
Marci Mihálka
Marci Mihálka - avatar