First you need to install tinypng-cli and provide an api key sudo npm install -g tinypng-cli Use this code to compress in the same directory If it has been compressed before and has the compressed- prefix, then other files will not get compressed. Make a file named tinify.command and place it in your directory. declare
