A currated repository of web design tools and resources that I use...


March 10, 2015 - HTML, PHP

phpThumb creates thumbnails on the fly. You can also load this as and object and utilize your own caching system. That is my preferred method as bypassing PHP and┬áserving images with Apache as much as possible has a lot of benefits. I will be the first to admit that the presentation phpThumb on their website is awful. You just have to muddle through it. I’ve built my own image resizing library before and there is always an edge case that screws everything up. Use this class and let it do all the heavy lifting. It is pretty rare that it can’t figure out the best way to crop or resize an image.

PHP thumbnail generator. Optional resizing, cropping, watermarking, unsharp mask sharpening, rotating, caching, borders. GIF reading with/without GD support. EXIF thumbnails can be extracted and/or used for large-source support. Works with any GD version.

phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is available, otherwise paletted-color and nearest-neighbour resizing is used. ImageMagick is used wherever possible for speed. Basic functionality is available even if GD functions are not installed (as long as ImageMagick is installed). One demo file uses portions ofJavascript API by James Austin.


This Resource In Action

Crossroads Church uses this library loaded as an object and cached.

Categories: HTML, PHP  Tags:

Daniel Posted by

Leave a Reply

Your email address will not be published. Required fields are marked *