GrabzIt
Tools to Capture and Convert the Web
website thumbnail

Create website thumbnails with GrabzIt

Often web developers need to create previews of web pages a good way of doing this is by creating website thumbnails. By default GrabzIt's API and Online Screenshot Tool will create website thumbnails by shrinking the screenshot until it fits within the maximum size allowed on the user's package.

However if you want to create a thumbnail image of your own size then it is recommended that the thumbnail is less than the size of the browserWidth and browserHeight parameters, 1024px and 768px respectively by default. Secondly it is important that both the width and height is kept to the same ratio of the browser width and height parameters.

Thumbnail Calculator

px
px
19%
146px
195px

This calculator automatically calculates the required width and height of your thumbnails based on what percentage you want the thumbnail to be of the browser size. While also keeping the image proportional to the browser size in order to stop any streching of the image.

For convenience any changes made with this calculator are reflected in the code examples below.

Thumbnail websites with our API

Integrate the ability to take webpage thumbnails into your application with GrabzIt's Screenshot API. To get started just choose one of the eight supported programming languages below to see a code example and further instructions.

This code example shows how easy it is to create a website thumbnail using ASP.NET. To start capturing thumbnails just download the ASP.NET Library, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for ASP.NET to find out all the ways you can use GrabzIt's API.

ImageOptions options = new ImageOptions();
options.BrowserWidth = 1024;
options.BrowserHeight = 768;
options.Width = 146;
options.Height = 195;

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.URLToImage("http://www.google.com", string.Empty, 1024, 768, 146, 195, ImageFormat.jpg, 0, string.Empty, 
BrowserType.StandardBrowser, string.Empty); 
grabzIt.SaveTo("images/result.jpg");

This code example shows how easy it is to create a website thumbnail using Java. To start capturing thumbnails just download the Java Library, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for Java to find out all the ways you can use GrabzIt's API.

ImageOptions options = new ImageOptions();
options.setBrowserWidth(1024);
options.setBrowserHeight(768);
options.setWidth(146);
options.setHeight(195);

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.URLToImage("http://www.google.com", options); 
grabzIt.SaveTo("images/result.jpg");

This code example shows how easy it is to create a website thumbnail using JavaScript. To start capturing thumbnails download GrabzIt's JavaScript Library. Then get your Application Key and Secret, add the domain you want to use the JavaScript on and then check out the screenshot API documentation for JavaScript to find out all the ways you can use GrabzIt's API.

<script src="grabzit.min.js"></script>
<script>
GrabzIt("APPLICATION KEY").ConvertURL("http://www.google.com", 
{"bwidth":1024,"bheight":768,"width":146,"height":195}).Create();
</script>

This code example shows how easy it is to create a website thumbnail using Node.js. To start capturing thumbnails just download the Node.js Package, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for Node.js to find out all the ways you can use GrabzIt's API.

var grabzit = require('grabzit');

var options = {"width":146, "height":195, 
    "browserHeight":768, "browserWidth":1024};

var client = new grabzit("APPLICATION KEY", "APPLICATION SECRET");
client.url_to_image("http://www.google.com", options);
client.save_to("images/result.jpg");

This code example shows how easy it is to create a website thumbnail using Perl. To start capturing thumbnails just download the Perl Library, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for Perl to find out all the ways you can use GrabzIt's API.

#!/usr/bin/perl

use GrabzItClient;

$options = GrabzItImageOptions->new();
$options->browserWidth(1024);
$options->browserHeight(768);
$options->width(146);
$options->height(195);

$grabzIt = GrabzItClient->new("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->URLToImage("http://www.google.com", '', 1024, 768, 146, 195);
$grabzIt->SaveTo("images/result.jpg");

This code example shows how easy it is to create a website thumbnail using PHP. To start capturing thumbnails just download the PHP Library, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for PHP to find out all the ways you can use GrabzIt's API.

include("GrabzItClient.class.php");

$options = new GrabzItImageOptions();
$options->setBrowserWidth(1024);
$options->setBrowserHeight(768);
$options->setWidth(146);
$options->setHeight(195);

$grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->URLToImage("http://www.google.com", $options); 
$grabzIt->SaveTo("images/result.jpg");

This code example shows how easy it is to create a website thumbnail using Python. To start capturing thumbnails just download the Python Library, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for Python to find out all the ways you can use GrabzIt's API.

import GrabzItClient

options = GrabzItImageOptions.GrabzItImageOptions()
options.browserWidth = 1024
options.browserHeight = 768
options.width = 146
options.height = 195

grabzIt = GrabzItClient.GrabzItClient("APPLICATION KEY", "APPLICATION SECRET")
grabzIt.URLToImage("http://www.google.com", options) 
grabzIt.SaveTo("images/result.jpg") 

This code example shows how easy it is to create a website thumbnail using Ruby. To start capturing thumbnails just download the Ruby Gem, get your Application Key and Secret and then use the demo contained within. Then check out the screenshot API documentation for Ruby to find out all the ways you can use GrabzIt's API.

require 'grabzit'

options = GrabzIt::ImageOptions.new()
options.browserWidth(1024)
options.browserHeight(768)
options.width(146)
options.height(195)

grabzItClient = GrabzIt::Client.new("APPLICATION KEY", "APPLICATION SECRET")
grabzItClient.url_to_image("http://www.google.com", options)	
grabzItClient.save_to("images/result.jpg") 	
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Screenshots
  • Bigger Everything
Start Free Trial