Html img error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Html img error

When I copy paste the url link of any img from goggle then why is it not displaying on my output?

29th Apr 2023, 7:06 AM
Ten Zii
10 Answers
+ 4
ah, because that's not a direct link to an image. You have to click through to the actual image location, for example in your case https://img.freepik.com/ premium-photo/ cat-love-cat-couple-hugging-cuddling-kissing-two-cute-cat-kittens-love-holding-red-heart-valentines-day-generative-ai_620624-6858.jpg Note that the link ends in the file type, in this case .jpg ; if you don't see an image file type at the end of the url, it's not a direct link to an image. Side note, be sparing with hotlinking images that are hosted on a site you don't own, like this. Unless the hosting site specifically says you can, it's considered bad form as it eats their bandwidth without giving them clicks (link intentionally broken for this reason)
29th Apr 2023, 7:38 AM
Orin Cook
Orin Cook - avatar
+ 3
Well, like I said, don't. It's rude. If a site wants you to be able to link directly to the image, they'll usually provide an in-page method of copying the URL. Otherwise, if it's a public domain or public license image, you can download a copy and rehost it yourself. If it's a copyrighted image (ie not explicitly public domain or public license), you have to get permission from the copyright holder first. Don't steal other people's images, and you won't get shut down by DMCA takedowns.
29th Apr 2023, 7:51 AM
Orin Cook
Orin Cook - avatar
+ 3
As Orin Cook stated Before you click and download images from the web, make sure you have permission to use them. You can check the terms and conditions of the website where you found the image to see if it's allowed. For example, if you found the image on Freepik, you can read their terms of use here: https://www.freepikcompany.com/legal#nav-freepik-agreement Personal use: https://support.freepik.com/s/article/Personal-use-FI?language=en_US If you have permission to use the image, you can simply right-click on it and select "copy image link" if you're using a desktop web browser. However, if you want to remove the watermark, you will need to purchase a premium version of the image or subscribe to the website that offers it. Then you'll be able to access higher rezed and unmarked images through their portal.
30th Apr 2023, 4:54 AM
Chris Coder
Chris Coder - avatar
+ 2
Post your code or we're just guessing blindly
29th Apr 2023, 7:13 AM
Orin Cook
Orin Cook - avatar
+ 2
Try to open a image in a seperate tab and click on the link above until it shows full link (it should have .png/.jpg/... on the end) Or as the person above said, just download it and save it locally, use that local location
29th Apr 2023, 3:12 PM
Hrvoje Kožul
+ 2
Image in a web may not end in file type.
30th Apr 2023, 7:46 AM
Toni Isotalo
Toni Isotalo - avatar
29th Apr 2023, 7:20 AM
Ten Zii
+ 1
Ten Zii A link to an image must end with its format (png, jpg, webp…). Your link is not an image, so it doesn’t appear
30th Apr 2023, 1:00 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
0
Ohh where can i copy the direct link ? Like you just did
29th Apr 2023, 7:41 AM
Ten Zii