Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate thumbnail images of HTML pages

I am trying to create thumbnail images for several HTML pages, so the user can have an idea of what the HTML looks like before they open the link. I have searched online but haven't found anything useful.

Could anyone here provide some tips? Thanks so much!

I specifically want this to happen on the server side so the client is not required to load the page

like image 963
Rouge Avatar asked May 01 '13 20:05

Rouge


People also ask

How do I create a thumbnail in HTML?

Create Thumbnails Individually Offline To create the thumbnail, open the image in Paint and then click the "Resize" button at the top of the page. Click the "Pixels" radio button and then enter the horizontal and vertical dimensions for the thumbnail.

How do I save a webpage as a thumbnail?

Once you are on the desired page, click Capture button. All captured images can be found in Captured Images tab. Now select the thumbnail from this tab and click Save, select the destination where you want to save the thumbnail. That's it.


3 Answers

You might want to check out this url: http://html2canvas.hertzen.com/.

Using this script, you can convert the page into a canvas on the client side.

Then you can use that as your thumbnail.

like image 101
Brian McCutchon Avatar answered Oct 02 '22 11:10

Brian McCutchon


You have to use Open Graph tags in you header tag:

<html>   <head>     <meta property="og:site_name" content="Your Website Name Here" />     <meta       property="og:title"       content="Yourtitle goes here, about 90 characters in length."     />     <meta       property="og:description"       content="description of URL that is about 300 characters in length."     />     <meta property="og:image" content="YOURIMAGEURL.JPG" />     <meta property="og:type" content="blog" />     <meta property="og:url" content="http://yourURL.com/" />   </head>   <body></body> </html> 
like image 22
Nasser Hadjloo Avatar answered Oct 02 '22 12:10

Nasser Hadjloo


http://api.s-shot.ru/?=(your url) and https://s.wordpress.com/mshots/v1/(your url)

I hope those Help!

like image 40
dk-pramis Avatar answered Oct 02 '22 11:10

dk-pramis