0
Where do I put my jpg files in if I want to insert an image in my code that I wrote with SoloLearn?
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 ;)
+ 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).
+ 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.
+ 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
+ 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 :(
0
Thanks...But what do you mean by "somewhere accessible"? I need an example.
0
Google Drive should work...doesn't it?