0

Where do I put my jpg files in if I want to insert an image in my code that I wrote with SoloLearn?

5th Apr 2020, 8:22 AM
Shamil Basayer
Shamil Basayer - avatar
7 ответов
+ 1
upload them somewhere accessible in the internet. Requirements are to have an url (internet address starting by "http(s)://" to be able to link your image to your code). It would no be necessary if you run code locally (from your file system), but sololearn code playground works in this way: code is send to server to be executed and output is returned... in case of web project the "output" response from the server is the html page, so from the code point of view, he's from outside of your device and isn't allowed/trusted to let access to your file system ;)
5th Apr 2020, 10:56 AM
visph
visph - avatar
+ 1
To an internet hosting provider wich give you a full access web link (starting with protocol and domain name, followed by a path commonly and then the image file name (not necessary the original one: often files are stored with idientifiers given to avoid names conflict on the storage).
5th Apr 2020, 11:32 AM
visph
visph - avatar
+ 1
Shamil Basayer hi, It means you have to use a cloud service like Dropbox or imgbb or else.Once your image is uploaded on that plateforme you can share a link to it and it's that link that you would put as a source in your <img> tag. If you use the search tool a the top a the discuss section I think you'll be able to find questions on the same topic with tutos include in the answer. Give it a try.
5th Apr 2020, 3:20 PM
EmmanueLZ.
EmmanueLZ. - avatar
+ 1
If your code doesn't require specific images, you can use some service with placeholder generator, for example: https://placeholder.com, https://placeholderimage.dev https://picsum.photos
6th Apr 2020, 11:29 PM
Hello World
Hello World - avatar
+ 1
I don't think so: for still some years google tends to follow a privacy policy forbiding cross-site request to ressources hosted on their services :(
27th Apr 2020, 10:45 AM
visph
visph - avatar
0
Thanks...But what do you mean by "somewhere accessible"? I need an example.
5th Apr 2020, 11:28 AM
Shamil Basayer
Shamil Basayer - avatar
0
Google Drive should work...doesn't it?
27th Apr 2020, 10:36 AM
Shamil Basayer
Shamil Basayer - avatar