Place all the images to be compressed in a Seperate folder in this path. Install dependencies, npm i Set image directory path to the imageDir variable in compress.js Run the command npm start