+ 1
Hello plz I have a problem.
Can you help me plz? I wanna get a link of a random image to put in img tag in HTML, how can I do?
9 ответов
+ 2
YoungMind
You forgot to add the extension .jpg, which can be seen in 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 's code.
Without it the link redirects to a webpage (which of course isnt an image), instead of an image. Be careful to use the link to the image and not the webpage as mostly simply adding a .jpg or .png extension might not work.(though it works here)
0
go with Unsplash.com
0
Thx both of yu mates!
0
But why I can't see it it?
https://code.sololearn.com/WrqY71iGz59x/?ref=app
0
Whaaat how did you do that?
0
Ok but how? How did you do that? So I can use it in other images (sorry for being quiet stupid)...Shall I just add some letters or what?
0
Use unsplash Api
0
Vitaliy ...?
- 1
You must learn JSON and some frameworks or libraries !