Skip to content

Instantly share code, notes, and snippets.

@tterb
Last active December 20, 2019 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tterb/ea18078ad1aba5ae854a7c2fc646c64f to your computer and use it in GitHub Desktop.
Save tterb/ea18078ad1aba5ae854a7c2fc646c64f to your computer and use it in GitHub Desktop.
Gulpfile images
// Optimize and copy image files
gulp.task('build:images', function() {
return gulp.src(paths.imageFilesGlob)
.pipe(imagemin({
optimizationLevel: 3,
progressive: true,
interlaced: true,
use: [pngquant()]
}))
.pipe(gulp.dest(paths.jekyllImageFiles))
.pipe(gulp.dest(paths.siteImageFiles))
.pipe(browserSync.stream());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment