Creating Dynamic Image Thumbnails Using PHP
Think how many websites that are built and need an image, and a thumbnail version of that image. When building boxofficeBUZ I came across a very simple but normal issue. Why waste time creating an image and thumbnail version in Photoshop or any other image processing software, why not do it dynamically with php.
Image credit: dcreeves2000
From there I started researching php’s built in GD image library, and ways to create thumbnails. There is a lot of information on creating thumbnails, most either create a thumbnail by just giving a height or width. If you can specify a height and width the thumbnails usually result in being stretched. It is from here that I started to combine scripts and eventually came up with a standard thumbnail script that I use for most of my websites. This not only creates a thumbnail, but crops the image keeping its dimensions intact and results in not stretching the thumbnail image.