Search code examples
ruby-on-railsimagefacebookurlpreview

How to recreate an image preview from outside websites?


Similar to Facebook's UI, I am attempting at generating a preview image from an external linked website. So that when a user types in a url he is linking, the UI will by default, scan that site for an img and scrape a preview thumb.

Is there a specific name for this technique? Or can anyone point me in the direction of learning this?

Thanks so much!


Solution

  • Its called scraping. There is a library called scrAPI.

    Here is a code example http://crunchlife.com/articles/2007/08/13/code-snippet-ruby-image-scraper