elixir-tinypng

1.1.0 • Public • Published

Version Downloaded

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.

Package Sidebar

Install

npm i elixir-tinypng

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • ethanclevenger91