Resize, optimise and serve images in node.js