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="https://www.pixilart.com/art/boxer-blue-w-8435d813bf2d04c" 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
Zakariya - avatar
3 Answers
+ 2
You have to link the image not page containing it. It has to be smt like this: www.freecloudstorage.com/storage/yourimage.jpg (just example) not www.freecloudstorage.com/storage/yourimage.html (note the extension).
6th Jan 2019, 9:01 AM
Maneren
Maneren - avatar
6th Jan 2019, 9:20 AM
Calviղ
Calviղ - avatar
0
That is a webpage link, not a image link, image normally ends with image file extensions, eg. jpg, gif, png. Try this https://art.pixilart.com/8435d813bf2d04c.png
6th Jan 2019, 8:59 AM
Calviղ
Calviղ - avatar