Create a simple app that includes the following:
- A webpage where the user can upload an image
- Each image has to be exactly 1024 x 1024.
- Don’t upload the file if it’s not the right size
- Each image has to be converted into four different sizes. horizontal : 755 x 450 vertical : 365 x 450 horizontal small : 365 x 212 gallery : 380 x 380 Images should not be stretched, they should be cropped.
- Save all four of these images locally on the server
- Show a webpage with all four of these new images.
Bonus: Instead of saving these files to the server, upload them to a cloud image hosting service.
Double Bonus: While uploading the image show a preview in the browser itself of all the different image sizes, and let the user decide how to crop the images to the smaller size.
- Make sure that you have Node.js v8.15.1 and npm v5 or above installed.
- Clone this repo using
git clone https://github.com/mknmohit/image-uploader.git
- Move to the appropriate directory:
cd image-uploader
. - Run
npm install
in order to install dependencies. - Run
npm start
to see the app athttp://localhost:3000
.
Please note that this project have been created using the react-boilerplate (https://github.com/react-boilerplate/react-boilerplate) as the base setup.