0

IMAGE

My brothers and sisters how can I put my image from my device storage in to my code

27th Feb 2025, 12:52 PM
Jakuma Christopher
Jakuma Christopher - avatar
2 Answers
+ 2
For practical usage, You cannot put images from your device storage. To add an image to the code, you need to add a url destination for the image, which doesn't exist if it's in your storage. You need to upload the image into a website, then copy the url and paste it in the src attribute of <img> tag. There are several websites where you can upload your image, I'd recommend Imgur: https://imgur.com However, if you're only practicing or testing, you CAN link the image from your storage. But note that this will only work if you have the image available in your storage, and it will only work in a local IDE(NOT Sololearn). To do that: Assume your image is "image.jpg" If the image is in the same directory as the html file you're working with, you can just use "image.jpg" in the src attribute. If it's in a specific directory, you can use path to link it. For example: "/storage/emulated/0/images/image.jpg"
27th Feb 2025, 1:16 PM
Afnan Irtesum Chowdhury
Afnan Irtesum Chowdhury - avatar
+ 4
Jakuma Christopher Use search bar, there are a lot of threads on this topic. Just get url from here:- https://sololearn.com/compiler-playground/Wy3lrXNwGsgJ/?ref=app Then, using image tag insert the url, <img src="image.url" alt="Image">
27th Feb 2025, 1:16 PM
Gulshan Mahawar
Gulshan Mahawar - avatar