Reputation: 5415
Im trying to figure out how to let a user enter a website or link on my webpage and then based on that url I would like to display a screenshot of that link sort of similar to when you post a video link from youtube on face book it grabs a small image. Ive seen some services but Id rather implement something myself on my server.
Upvotes: 0
Views: 558
Reputation: 12563
I've used programs like webkit2png in the past, but it's mac-only. I have never used it but this looks like a more generic linux equivalent:
http://khtml2png.sourceforge.net/
I presume your server is running some flavor of linux; you might have to jump through some hoops to install Qt and ImageMagick if you don't have them already or if you are on a shared server.
For the record, although it says that it can't "scale the output image" in the newer versions of this library, that's a very straightforward operation you can apply with many other libraries/programs.
Upvotes: 1