Script to compress images using TinyPNG api with nodejs Installation $ npm install Usage Place you images in the same directory as compress.js Run the following (image extension can be either jpg or png ) $ node compress.js [image-extension]