fixes #25 (resize images before uploading)