-2

When we open a new tab in google chrome it shows thumbnails as this. focus on thumbnails . Is there a way that I can also use this thumbnail facility on my html webpage such that I just pass the url's of various sites and it shows in the same manner. I can not use fixed images as the content on the websites (I wish to display as thumbnails) keeps on changing.

eliya
  • 99
  • 7

2 Answers2

0

While it is possible to get a screenshot of a page with client side code, the Same Origin Policy will prevent you from doing it to arbitrary third party sites.

You would need to look for a server side solution to generate your screenshots. There are several tools that could help (PhantomJS and Selenium spring to mind). You would need to write a web server that you could use to pass a URL over and get a screenshot back.

Community
  • 1
  • 1
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

If you are using WordPress, there is some information about it here

There is a plugin to download, but there is also a code example.

RST
  • 3,899
  • 2
  • 20
  • 33