3

I would like to know how to set the thumbnail of a screenshot of a website when someone submits that site to my directory. It would need to be automatically generated.

See an example

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364
misharnet
  • 31
  • 2

2 Answers2

1

There is a good service to do this but I'm afraid it's not available in English (only French or Spanish): http://robothumb.com.

Zistoloen
  • 10,056
  • 6
  • 36
  • 59
1

I use Selenium and Firefox.

Selenium is a browser automation scripting framework with an API so that it can be called from a variety of programming languages. It allows you to remote control Firefox:

  • Create a new window of a specific size
  • Open a URL in that window
  • Save the visible portion of the webpage to an image (like a screenshot)

To make this work on a server, you have to get Firefox running "headless" in a virtual frame buffer.

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364