img src not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

img src not working

So, I created a pixel art character and wanted to use it in my js game. I used this: <img src="" style ="width:50px;height:50px;"> however, it never came up with the image. What is the cause and how can I resolve it?

6th Jan 2019, 8:50 AM
Zakariya - avatar
3 Answers
+ 2
You have to link the image not page containing it. It has to be smt like this: (just example) not (note the extension).
6th Jan 2019, 9:01 AM
Maneren - avatar
6th Jan 2019, 9:20 AM
Calviղ - avatar
That is a webpage link, not a image link, image normally ends with image file extensions, eg. jpg, gif, png. Try this
6th Jan 2019, 8:59 AM
Calviղ - avatar