I am using Google's Custom Search API to dynamically provide web search engine results. I very intensely looked the API's paperwork and may not find something that states it grants or loans you use of Google's site image previews, which are actually saved as base64 encodes.

I wish to have the ability to provide image previews for sites for each one of the web addresses the Google web search API returns. Bear in mind which i don't want these images to become pictures, but instead large images. My real question is what's the easiest method to start carrying this out, when it comes to both efficiency and price, both in rapid and long-term.

One option is to crawl the net and generate and keep images myself. This really is way beyond my technical ability, and plus storing many of these images could be too costly.

Another option is to dynamically fetch the pictures immediately after Google's API returns the search engine results. However where/the way i fetch the pictures is yet another question.

Would there be an inexpensive method of me producing the pictures myself? Or would the very best solution be to make use of some kind of site thumbnailing service that performs this for me personally? Would this be fast enough? Will it be too costly? Would the service supply the image within the correct size for me personally? Otherwise, how could I change how big the look?

I'd really appreciate solutions which are comprehensive as well as for any code good examples to stay in ruby using rails.

Screen shotting webpages dependably is very difficult to accomplish. The primary issue is that the present solutions (khtml2png, CutyCapt, Phantom.js etc) are based on QT which supplies use of an embedded Webkit library. However that webkit build is very old with HTML5 and CSS3, the majority of the effects either do not show, or render improperly.

Among my co-workers has utilized most, if not completely, from the current technologies for producing screenshots of webpages for just one of his personal projects. He's written an interesting publish about this here about how exactly lucrative utilizes a SaaS solution rather than attempting to conserve a solution themself.

The TLDR version lucrative uses URL2PNG to complete all his thumbnail and full-sized screenshots. It is not free, but he states that it works for him. If you won't want to rely on them, they've a listing of the rivals here.