Nerds Pledge Magnanimously
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

laralix-imagemin

2.0.2 • Public • Published

laralix-imagemin

This is a simple ImageMin wrapper around Laravel Elixir 6.x. Add it to your Elixir-enhanced Gulpfile, like so:

Install

npm install laralix-imagemin --save-dev

Usage

imagemin(src, output, options);

Example Gulpfile:

var elixir = require('laravel-elixir');
 
require('laralix-imagemin');
 
elixir(function(mix) {
   mix.imagemin('resources/assets/img/*', 'public/img');
});

This will scan your resources/assets/img directory for all image files and place them in your public/img folder.

Custom ImageMin Options

You can override the default imagemin options by passing in an options object like so:

mix.imagemin('resources/assets/img/*', 'public/img', {
    interlaced: true,
    optimizationLevel: 3,
    progressive: true
});

Available ImageMin options are listed here in the gulp-imagemin readme.

install

npm i laralix-imagemin

Downloadsweekly downloads

6

version

2.0.2

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar