elixir-tinypng
v1.1.0
Published
wrapper for gulp-tinypng-extended plugin
Downloads
4
Maintainers
Readme
elixir-tinypng
Elixir wrapper for gulp-tinypng-compress
Install
Requires node 0.10.x
or above
Install with npm - In your project folder, run:
npm install elixir-tinypng
Example
var elixir = require('laravel-elixir');
require('elixir-tinypng');
elixir(function(mix) {
mix.tinypng({
key: 'API_KEY',
sigFile: '.tinypng-sigs',
});
});
mix.tinypng([options])
options
See options for gulp-tinypng-compress
Custom Directory Structure
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"
}
File types
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.
License
MIT © Ethan Clevenger
Wrapper for:
MIT © Stan Hutcheon - Bigfork Ltd.