thumbnail-plus (hackage): This package provides every tool you need to easily and safely generate thumbnails for JPG, GIF and PNG images.  By safely, we mean that this package should be able to handle images uploaded to a public web server without any known vulnerabilities:  File sizes are constrained and checked.  Image sizes are constrained and checked before the images are loaded into memory.  Uses imagesize-conduit by Michael Snoyman.  Optionally, the original image is reencoded before being saved.  The images are processed using the GD library, which is heavily battle-tested and audited by many pairs of eyeballs.  Please report any vulnerabilities you may find, we take strive to make this library suitable for processing arbitrary images.
Keywords: graphics|library|mit