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:
parent
72c8b3d7fe
commit
eb632ce0e3
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user