- turn functions accepting callbacks into promises, and then chain them with .then statements
-
Setup
- Clone this project
- Relative path to App.js in the console run 'npm install'
-
Execution
- Place all images in the images folder
- Relative path to App.js, in the console run 'npm start'
- NOTE: Added CLI input, run with the target folder as command line argument.
- TODO: automatically create a new folder to export files into, create as sibling to the target folder That's it!
NOTE: Setup only done once. If you want to batch process a set of images again, all you need to do is the execution part. Delete the file .gitkeep in the folders images and webp-coverted, only reason why there is a file .gitkeep in there so that i can push an empty folder.
- Command line argument input directory
- Autocreates output directory
NOTE: Setup only done once. If you want to batch process a set of images again, all you need to do is the execution part.
- images folder, is where you place your images.
- webp-converted folder, is the output folder, all converted images goes in here.
https://github.com/scionoftech/webp-converter
https://developers.google.com/speed/webp
Norvillie Villaruel Ashlyn Knox SAIT web dev 2021