Thumbnails on the fly

Thursday, January 03, 2008   —   Vienna 0 Comments

This article will show you how to create thumbnails dynamically. For example, these three images have been dynamically generated from the same source.

The above images are generated with a URL like this one: www.petrosalema.com/blog/articles/burger_thumb_100.jpg; where 100 is changeable.

The benefits of being able to dynamically generate images of varying size from a single source file are too obvious to get into. But I will mention that I'v done some research and websites like Amazon, Wikipedia, IMDb, iStockPhoto, and Flickr, where there are large numbers of images to manage, all use this approach.

Below are images of varying size dynamically generated image from Wikipedia using this URL pattern: upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Hamburger_sandwich.jpg/100px- Again, to generate each image 100 is simply changes to the desired width which in this case was 200 and 300.

  more »