+ 1

I have a photo saved as redbag.jpg but the image tag never displays it what's going on?

https://code.sololearn.com/WoXeASEJ6Bhm/?ref=app

6th Nov 2023, 7:53 AM
Fin
7 Respuestas
+ 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">
7th Nov 2023, 4:18 PM
Chris Coder
Chris Coder - avatar
+ 2
Didn't you ask the same question earlier and got the answer? https://www.sololearn.com/discuss/3250112/?ref=app
6th Nov 2023, 9:09 AM
Wong Hei Ming
Wong Hei Ming - avatar
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.
6th Nov 2023, 11:15 AM
Bob_Li
Bob_Li - avatar
0
But I saw other people's code that has there own images in the code
6th Nov 2023, 4:38 PM
Fin
0
And yes I did but I thought you could add your own images so I tried again
6th Nov 2023, 4:39 PM
Fin
6th Nov 2023, 4:44 PM
Fin