+ 14

Can i attach an image through my phone.. Bt i see no location!!! Help plz..thanx

image location through phone!!

14th Aug 2017, 1:59 PM
Murrah
Murrah - avatar
5 Réponses
+ 28
All codes on the Code Playground are located on SoloLearn's database. This means locally referenced images would also have to be on SoloLearn's database. Unfortunately, there is no easy way to upload images to SoloLearn's database, at the time I write this. There are two solutions to this problem. The first solution is quite simple. All you have to do is upload your image to a CDN (such as Imgur) and use the respective URL. The second solution is to convert the image to Base64 text, and to set that as the value of the <img>'s src attribute. (There are plenty of websites that convert images to Base64.) This is basically putting the image file directly into the HTML file. Note that this workaround can cause lag within SoloLearn's IDE, since Base64 representations of images are very long strings.
14th Aug 2017, 7:27 PM
Erik Johanson
Erik Johanson - avatar
+ 4
thanx bro.. you explained it all i needed!!
15th Aug 2017, 4:13 AM
Murrah
Murrah - avatar
+ 4
For sololearn programs you can't put images stored on your device so you might have to use a CDN (content delivery network) to link images in the page or use data uri images by converting your images into text that HTML can display as a image.. You can convert your images here https://websemantics.uk/tools/image-to-data-uri-converter/ https://code.sololearn.com/WC54BZf4fJ94/?ref=app
4th Sep 2017, 2:17 AM
Kalo 'smi
Kalo 'smi - avatar
0
20th Aug 2020, 10:12 PM
Opoku Bismark
Opoku Bismark - avatar