laravel-elixir-imagemin
laravel-elixir-imagemin copied to clipboard
Getting gulp-imagemin: Minified 0 images (saved 0 B - 0%) when images are present
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?
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.
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();
});
+1
+1
I am on El Capitan too
+1 same here
+1
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
}]
})
Hi there! Still not working :( Any ideas?
+1
same - following
+1
+1 Ubuntu i think is the node version