Image batch compression script written using TinyPNG API.
-
Go to tinypng.com to apply for API-Key
-
Fill in the API-Key into /index.js
// index.js Line 30 tinify.key = "Your TinyPNG API-KEY";
-
Use
yarn installto install dependency packages -
Place the images that need to be compressed and built in the
/entrydirectory, which supports folders -
Run the command
yarn buildornode index.js -
Wait for the execution to complete and the output results will be in the
/outputfolder.
