From eb632ce0e3747331bb6797e4f49bb4dd4fd382b0 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 7 Jun 2015 03:38:58 +0200 Subject: [PATCH] exclude /media from image optimization --- gulpfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b5ebbf8c..62493269 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -163,12 +163,14 @@ gulp.task('media', function() { // Image optimization // gulp.task('imagemin', function () { - return gulp.src(dist + '/**/*.{png,jpg,jpeg,gif,svg}') + return gulp.src([ + dist + '/**/*.{png,jpg,jpeg,gif,svg}', + '!'dist + '/media/**/*' + ]) .pipe($.cache($.imagemin({ - optimizationLevel: 4, // png + optimizationLevel: 3, // png progressive: true, // jpg interlaced: true, // gif - multipass: true, // svg svgoPlugins: [{removeViewBox: false}] }))) .pipe(gulp.dest(dist));