+ 1
I have a photo saved as redbag.jpg but the image tag never displays it what's going on?
7 odpowiedzi
+ 5
You could search here for an answer first.
https://www.sololearn.com/discuss/75185/?ref=app
https://www.sololearn.com/discuss/565851/?ref=app
https://www.sololearn.com/discuss/2300196/?ref=app
https://www.sololearn.com/discuss/1325165/?ref=app
https://www.sololearn.com/discuss/156414/?ref=app
https://code.sololearn.com/WT3661NHpV3B/?ref=app
+ 5
Hi Fin , you cannot access your own images from your device within the playground as it is a cloud environment and does not have access to your drive. In the example you shared, the image does not display. However, there are attributes present. What you see is not an image, but an image border created by adding attributes: width="350" and height="400" to the image element. In order to use an image from your personal collection, you will need to employ an image hosting service and then link directly to the host's address.
displaying the border / placeholder.
<img src="redbag.jpg" width="350" height="400">
+ 2
Didn't you ask the same question earlier and got the answer?
https://www.sololearn.com/discuss/3250112/?ref=app
0
your image have to point to a valid url.
You can't just link it to a file in your local drive and expect it to find it when you deploy your page. The html opened elsewhere have no access to your files.
0
But I saw other people's code that has there own images in the code
0
And yes I did but I thought you could add your own images so I tried again
0
https://code.sololearn.com/W3HvL6aB2cnC/?ref=app see you can add it from files