flask based webapp to resize images on the fly