This snippet focusses on optimizing high resolution images and then uploading them onto S3.
- parses the obtained images through multiparty.
- Process the obtained image using sharp.
- Upload the image on to S3
Requires the following dependencies to work properly:
- sharp - To process the images
- human-readable-ids - To give funny names to your files.
- multiparty - To parse incoming HTTP requests.
- aws-sdk - To create aws instance for file upload.
- s3-upload-stream - To upload stream of data to aws through piping.
This snippet requires Node.js v6+ to run.
Add it to your node application and Install the dependencies.
Free Software, Hell Yeah!