How to use the gulp-imagemin.mozjpeg function in gulp-imagemin

To help you get started, we’ve selected a few gulp-imagemin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github theme-my-login / theme-my-login / gulpfile.js View on Github external
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'));
}
github theme-my-login / theme-my-login / gulpfile.js View on Github external
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'));
}

gulp-imagemin

Minify PNG, JPEG, GIF and SVG images

MIT
Latest version published 8 months ago

Package Health Score

69 / 100
Full package analysis