This week I have worked on a project, which required me to categorize few websites and show screenshots of those websites arranged neatly.Â Special requirement was dynamic creation of website screenshots because if the administrator wants, he will just add the URL and the screenshot need to be generated automatically.
I have searched for few solutions and ended up using Websnapr.Â It has very simple API to fetch the screenshots of websites.Â If it does not have the screenshot for the website we need, it will update it in few seconds after the first request made for it.
There are free and premium services available.Â Free service allows 100,000 requests per month and if your site needs more than that, then you need to upgrade.Â It is around $45 per month.Â Website screenshots will be updated once in a month.
Go to Websnapr and register for a free account with the domain where you want to implement their service.Â It will give you an API key, which looks like â€œ123ABc1abcdA.â€Â Then, edit HTML of your website and use the following code to render the dynamic web screenshots.
<img src=”http://images.websnapr.com/?size=Size&key=YourAPIKeyHere&url=http://www.DomainURL.com” />
“Size” parameters: Use â€œTâ€ for 92×70 pixel screenshots and “S” for 202×152 pixel screenshots.
If your site requests are more than 100,000, either you need to upgrade to their premium service or you can use tiny Firefox extensions to manually grab the screenshots.Â Use Screengab, Abduction!, or FireShot if you are looking for advanced editing features.