Search code examples
javascripthtmlscreen-scrapingrendering

How to create a thumbnail image of html content stored in a database


If you were to convert this html content into a small thumbnail image , how would you do it?

P.S. I'm trying to do this to allow users on my site to browse through their posts(containing html elements (e.g. strong, i, img tag's).


Solution

  • See here:

    http://www.thumbalizr.com/index.php

    They have a pretty decent simple API

    Simple syntax to use the API: http://api.thumbalizr.com/?url=http://www.ford.de&width=250

    Parameter:

    Check http://api.thumbalizr.com for more details.

    So you can simply have <img src='http://api.thumbalizr.com/?url=http://www.yourdomain.com&width=250' />

    Also see http://www.websnapr.com/ and their implementations page