Bindings to jpegoptim, jpeglib for jpeg image optimize
var jpegoptim = require('jpegoptim');
var quality = 50; // 1~100
jpegoptim.optimize('./img/input.jpg', './img/output.jpg', quality);
You can install the latest tag via npm:
npm install git://github.com/coolbong/node-jpegoptim.git