Implement a thumbnail-generation plugin.

Implemented thumbnail generation for my own website so that I can do galleries, and thought I would share.