Hello plz I have a problem. | SoloLearn: Learn to code for FREE!

+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?

5/23/2020 10:22:29 AM

YoungMind

14 Answers

New Answer

+4

YoungMind Observe both the links https://www.shutterstock.com/image-photo/mathematics-lesson-differential-integral-calculus-chalkboard-1197141733 https://image.shutterstock.com/image-photo/mathematics-lesson-differential-integral-calculus-600w-1197141733.jpg 1st one is a website page link 2nd one is an image link You have to use image link, & can be accessed by opening the image or via downloding it

+2

Prabhakar Dev YoungMind Only .jpg or extension is not added Plz observe both links again, you'll get some more differences

+1

YoungMind Use pixabay, pinterest,pexels to get unlimited images link in high resolution

+1

+1

YoungMind You have not opened the image See this 👇👇👇 https://code.sololearn.com/Ws10xxQYEGr4/?ref=app

+1

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 !