How can I insert img in html code.I done by inserting from url link.but I want to insert img that is stored in my local storage | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How can I insert img in html code.I done by inserting from url link.but I want to insert img that is stored in my local storage

26th Apr 2018, 10:52 AM
Rishi Kumar.S
Rishi Kumar.S - avatar
3 Answers
+ 24
Rishi Kumar.S to add image in SL code playground u have to 1st upload the image to some cloud storage and generate a link and then use it in src... u can use Dropbox or any other u like check out the code here 👇 https://www.sololearn.com/discuss/1054246/?ref=app
26th Apr 2018, 11:08 AM
🌛DT🌜
🌛DT🌜 - avatar
+ 5
Rishi Kumar.S you can host your images on your local device only for yourself by referring to some folder. <img src= " ./myFolder/IMG.jpg"> but if you want that your images be served from your device to other people as well , then you would have to set up an image server , to serve images to users when requested. I would prefer nodejs to do this myself , but it would be very simple, slow and un- optimized, but good for learning purpose. but for practical purpose, I would host my images at Imgur, Dropbox , etc as said by DT
26th Apr 2018, 11:53 AM
Morpheus
Morpheus - avatar
+ 1
Thank you all for your answers
26th Apr 2018, 12:56 PM
Rishi Kumar.S
Rishi Kumar.S - avatar