Image thumbnailing middleware for Connect.js