Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting gulp-imagemin: Minified 0 images (saved 0 B - 0%) when images are present #9

Open
mdunbavan opened this issue Aug 12, 2015 · 12 comments

Comments

@mdunbavan
Copy link

Hi,

I have just installed this into my laravel project and I have the setup as follows:

process.env.DISABLE_NOTIFIER = true;
var elixir = require('laravel-elixir');
// var BrowserSync = require('laravel-elixir-browsersync');
require('laravel-elixir-imagemin');
require('laravel-elixir-uglify');
require('laravel-elixir-browser-sync-simple');


/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(function(mix) {
    mix.sass('app.scss', null, { includePaths: ['resources/assets/sass/partials','resources/assets/sass/bourbon', 'resources/assets/sass/fontawesome','resources/assets/sass/partials/css3'] })
    .browserSync({
      proxy: 'synergycamps.dev',
        logPrefix       : "Laravel Elixir BrowserSync",
        logConnections  : false,
        reloadOnRestart : false,
        notify          : false
    });

    mix.scripts([
        'app.js'
    ]).uglify('**/*.js', 'public/js', {
        mangle: true,
        suffix: '.min'
    });
    mix.imagemin("IMG_5877.jpg");
});

When I do gulp watch I get the message title output and no images are changed at all. In my /resources/img/ folder I have got the image but nothing is being touched.

Is this a bug?

@coryarmbrecht
Copy link

Hey @mdunbavan, I'm getting the same issue with gulp-imagemin. Perhaps I will reference this in an issue there, though I'll probably be pointed to post it on SO.

@marionava
Copy link

I'm getting the same issue with gulp-imagemin. I'm using OS X El Capitan.

var elixir = require('laravel-elixir');
require('laravel-elixir-imagemin');

elixir.config.images = {
    folder: 'public/images',
    outputFolder: 'public/images'
};

elixir(function(mix) {
    mix.imagemin();
});

@shaneparsons
Copy link

+1

@andyosbert
Copy link

+1

I am on El Capitan too

@MarekMaras
Copy link

+1
same here

@jpggvilaca
Copy link

+1

@irineujunior
Copy link

Maybe this help someone =)

Old syntax

        .imagemin('./resources/assets/img', 'public/assets/img/', {
            optimizationLevel: 3,
            progressive: true,
            interlaced: false,
            svgoPlugins: [{
                removeViewBox: false
            }]
        })

New syntax

elixir.config.images = {
    folder: 'img',
    outputFolder: 'assets/img'
};
.imagemin({
            optimizationLevel: 3,
            progressive: true,
            interlaced: false,
            svgoPlugins: [{
                removeViewBox: false
            }]
        })

@facundofarias
Copy link

Hi there!
Still not working :(
Any ideas?

@valkirilov
Copy link

+1

@kokoruz
Copy link

kokoruz commented Mar 6, 2018

same - following

@MiKatre
Copy link

MiKatre commented Mar 28, 2018

+1

@jorgeav527
Copy link

jorgeav527 commented Sep 8, 2018

+1 Ubuntu i think is the node version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests