PNGs 2 WEBPs
Convert all the png pictures in a directory to webp.
Directions
The package script is located in ./pngs2webps/pngs2webps.js. The main function is as follows:
- pngs2webps - to convert all the png file in a directory into webp
- @param origin - String: origin path of the png files
- @param dir - String: path to save the webp files
- @param timeStamp - Number(optinal): (in hours) the expires of the webp file
- @param logPath - String(optinal): path to save the log file
Usage
let pngs2webps = ;;
Requirements
- Node.js 6+
Run Demo
$node test.js