Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function images() {
return gulp.src([
'src/assets/images/**/*'
])
.pipe(gulpImagemin([
gulpImagemin.gifsicle({interlaced: true}),
gulpImagemin.mozjpeg({quality: 75, progressive: true}),
gulpImagemin.optipng({optimizationLevel: 5}),
gulpImagemin.svgo({
plugins: [
{removeViewBox: true},
{cleanupIDs: false}
]
})
]))
.pipe(gulp.dest('build/assets/images'));
}
function adminImages() {
return gulp.src([
'src/admin/assets/images/**/*'
])
.pipe(gulpImagemin([
gulpImagemin.gifsicle({interlaced: true}),
gulpImagemin.mozjpeg({quality: 75, progressive: true}),
gulpImagemin.optipng({optimizationLevel: 5}),
gulpImagemin.svgo({
plugins: [
{removeViewBox: true},
{cleanupIDs: false}
]
})
]))
.pipe(gulp.dest('build/admin/assets/images'));
}