Elixir wrapper for gulp-tinypng-compress
Requires node 0.10.x
or above
Install with npm - In your project folder, run:
npm install elixir-tinypng
var elixir = require('laravel-elixir');
require('elixir-tinypng');
elixir(function(mix) {
mix.tinypng({
key: 'API_KEY',
sigFile: '.tinypng-sigs',
});
});
See options for gulp-tinypng-compress
By default, images in resources/assets/img
will be compiled to public/img
. You can override this by setting Elixir's config:
config.img = {
folder: "raw/images",
outputFolder:"compressed/images"
}
TinyPNG only processes PNGs and JPGs. For everything else (GIFs, SVGs, etc.), you'll want to either write an additional task to move them or put them directly into the directory your processed images are going in.
MIT © Ethan Clevenger
Wrapper for:
MIT © Stan Hutcheon - Bigfork Ltd.