I am building an interface similar to Google images search service. I know that Google is storing the thumbnails in the database and when you click on the thumbnail, it displays a page that is hot-linking to the image on the actual website.

Unlike Google, I'm trying to avoid saving the messages in the database. I'd like to display the thumbnails also using the hot-linking mechanism.

I have couple of questions regarding this approach.

  1. How would the user experience be because the websites I am hot-linking to would have different speeds.

  2. Is there any example of a website that does something similar? (One that uses only hotlinks)

  • You're going to request full-size images from the remote host, then scale them client-side to be thumbnail sized? If so, you're going to be making possibly tens of MB of image requests for each page, all from different hosts (incurring DNS lookup and HTTP connection delays for each), and so the results page would load very, very slowly and use lots of bandwidth and memory. You'll also get lots of sites blocking you.
    – Kit Grose
    Jun 1 '15 at 3:52
  • @Kit Grose , thanks , I think thats why Google stores the thumbnails and then displays the full size image using a hotlink when a thumbnail is clicked upon, I can take the same approach but want to avoid storing the thumbnails too if possible. Jun 1 '15 at 3:56
  • what do you mean by hotlink? is that just a term for hyperlink?
    – tohster
    Jun 1 '15 at 12:02
  • @tohster No. Hotlink is all about presenting content on users from another site, by calling directly the server that has the content (may sounds complicated, follow me on the example). For example I could make an app that uses icons from facebook. Now instead of having them on my server, I would be loading the icons from urls like "www.facebook.com/images/settings.png''. This is referred as image hotlink and it uses power/bandwith of another server, which is not so ethical.
    – gpelelis
    Jun 1 '15 at 18:10
  • 1
    @gpelelis thanks! that's a very clear explanation.
    – tohster
    Jun 1 '15 at 23:03

Linking directly to images on third-party websites will create a bad user experience because some of those websites are almost sure to be slow or completely unavailable. Based on experience with the Google image search API, it is common for several images out of 100 to fail loading from the original URL, even though Google regularly refreshes its index.

If you want guaranteed availability, you have to cache the images yourself. Otherwise, you will have a lot of broken images. (An alternative solution would be to hide failed images with Javascript, if that works for your application.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.