1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-29 07:26:22 +01:00

exclude /media from image optimization

This commit is contained in:
Matthias Kretschmann 2015-06-07 03:38:58 +02:00
parent 72c8b3d7fe
commit eb632ce0e3

View File

@ -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));