Skip to content

Instantly share code, notes, and snippets.

@floster
Created October 3, 2017 06:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floster/f516ddc6dec3bc536e28675bb65ef2e0 to your computer and use it in GitHub Desktop.
Save floster/f516ddc6dec3bc536e28675bb65ef2e0 to your computer and use it in GitHub Desktop.
const gulp = require('gulp');
const imagemin = require('gulp-imagemin');
const imageminMozjpeg = require('imagemin-mozjpeg');
gulp.task('mozjpeg', () =>
gulp.src('src/*.jpg')
.pipe(imagemin([imageminMozjpeg({
quality: 85
})]))
.pipe(gulp.dest('dist'))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment