laravel-elixir-imagemin icon indicating copy to clipboard operation
laravel-elixir-imagemin copied to clipboard

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

Open mdunbavan opened this issue 9 years ago • 12 comments

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?

mdunbavan avatar Aug 12 '15 15:08 mdunbavan

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.

coryarmbrecht avatar Aug 27 '15 21:08 coryarmbrecht

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();
});

marionava avatar Nov 13 '15 20:11 marionava

+1

shaneparsons avatar Dec 02 '15 21:12 shaneparsons

+1

I am on El Capitan too

andyosbert avatar Dec 22 '15 07:12 andyosbert

+1 same here

MarekMaras avatar Jan 02 '16 12:01 MarekMaras

+1

jpggvilaca avatar Mar 03 '16 17:03 jpggvilaca

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
            }]
        })

irineujunior avatar Mar 16 '16 19:03 irineujunior

Hi there! Still not working :( Any ideas?

facundofarias avatar May 31 '17 16:05 facundofarias

+1

valkirilov avatar Jun 14 '17 08:06 valkirilov

same - following

kokoruz avatar Mar 06 '18 17:03 kokoruz

+1

MiKatre avatar Mar 28 '18 16:03 MiKatre

+1 Ubuntu i think is the node version

jorgeav527 avatar Sep 08 '18 04:09 jorgeav527