Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gulp: Images minificaiton task
* Images
* Look at src/images, optimize the images and send them to the appropriate place
gulp.task('images', function() {
// Add the newer pipe to pass through newer images only
return gulp.src(['./assets/img/raw/**/*.{png,jpg,gif}'])
.pipe(rimraf({ force: true }))
.pipe(imagemin({ optimizationLevel: 7, progressive: true, interlaced: true }))
.pipe( notify( { message: 'Images task complete', onLast: true } ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.