node-mozjpeg-bin
A node wrapper for mozjpeg binaries.
Requirements
You need to be able to build mozjpeg in order to install mozjpeg-bin (see the build requirements).
Installation
npm install mozjpeg-bin
Usage
var execFile = execFile; // Get the path for the jpegtran/cjpeg/djpeg binaryvar jpegtran = jpegtran;var cjpeg = cjpeg;var djpeg = djpeg; ;
CLI
You can also use mozjpeg through CLI by using mozjpeg-jpegtran
, mozjpeg-cjpeg
or
mozjpeg-djpeg
(use npm install -g mozjpeg-bin
to make those globally available on your
system).
This module was inspired by kevva/mozjpeg.