img src not working | Sololearn: Learn to code for FREE!

+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?

1/6/2019 8:50:41 AM

Zakariya

3 Answers

New Answer

+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).

+1

Here for your study https://code.sololearn.com/WW2zzRFwpH9v/?ref=app

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