Lasso Soft Inc. > Home


AuthorDominique Guardiola Falco
LicensePublic Domain
Posted19 Jan 2008
Updated17 Oct 2009
More by this author...


Use the WebThumb snapshot Service to create a JPEG snapshot of a given URL. It requires you sign up for the service.
Returns a HTML tag containing the URL to the JPEG thumbnail. This simple GET method permits 3 differents type of snapshots

  • small = 80 x 60 pixels
  • medium = 160 x 120 pixels
  • medium2 = 320 x 240 pixels

The image can be long to show (few seconds), so saving the file for future use using the -file option can be useful.


A XML API is availble at WebThumb, with more options (excerpts, PNG support, custome sizes, etc)

Sample Usage

        -url= '',
	-userid= 'xxxx',
	-apikey= 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

To display the  with custom CSS class an ID ,and 
download the thumbnail in a given path.

        -url= '',
	-userid= 'xxxx',
	-apikey= 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.



Use the WebThumb Service to create a JPEG snapshot of a given URL
It requires you sign up for the service at
Returns the URL to pickup the snapshot.

If you use this option, a file will be created or overwrited and the tag
will return the filepath.

small = 80 x 60
medium = 160 x 120
medium2 = 320 x 240
larger = ?


define_tag: 'easythumb',
	Lasso_ExecutionTimeLimit: 60;
	local('service_url') = ''; //can change some day
	!local_defined('size')? local('size') = 'small';  //  {small | medium | medium2}		
	!local_defined('cache')? local('cache') = '1';
	local('datestamp') = date_format((Date_LocalToGMT:date),-Format='%Y%m%d');

	local('string_url') = string(#service_url + '?user=' + #userid + '&url=' + encode_url(#url) + '&size=' + #size + '&cache=' + #cache + '&hash=' + encrypt_MD5(#datestamp + #url + #apikey));

	local('response') = include_url(#string_url, -timeout=0);

	if: string_extract(#response, -startposition='0', -endposition='30') !>> 'JFIF';

		//the long french error message is here to explain with a link that
		//perhaps the targeted web site uses some strange redirection
		//the system could not follow, it says : check the real URL before.
		Error_SetErrorMessage( 'Error: '+string(#response));
		return('Erreur: '#response'
Relancez la création d'icône en cliquant sur l'onglet «texte» puis à nouveau sur l'onglet «icône».
Attention: Il se peut que l'adresse de siteque vous avez fournie ('#url') ne soit pas vraiment celle de la page d'accueil. Essayez de cliquer ici.
Si le site utilise une redirection, c'est à dire si l'adresse figurant dans la barre d'dresse est différente de celle que vous avez fournie, recopiez la véritable adresse pour que notre système puisse prendre une photo d'écran correctement.'); else; local('result') = ' -userid= '#userid'
URL = '#string_url'
'error_currenterror' 'file_currenterror; error_code != '0' ? return(error_currenterror' 'file_currenterror)|return(#result); /if; /define_tag;


No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft