Skip to content

Image batch compression script written using TinyPNG API.

License

Notifications You must be signed in to change notification settings

Pszz/Tinypng-Batch-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyPNG Batch Script

Image batch compression script written using TinyPNG API.

How to use

  1. Go to tinypng.com to apply for API-Key

  2. Fill in the API-Key into /index.js

    // index.js Line 30
    tinify.key = "Your TinyPNG API-KEY";
  3. Use yarn install to install dependency packages

  4. Place the images that need to be compressed and built in the /entry directory, which supports folders

  5. Run the command yarn build or node index.js

  6. Wait for the execution to complete and the output results will be in the /output folder.

Support image formats: ["png", "jpeg", "webp"]

More usage

Example preview

  • Before image(868 KB) ./entry/example.webp

  • After image(90 KB, Optimization rate 964%) ./entry/example.webp

About

Image batch compression script written using TinyPNG API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published