Lossy compression (imagemin-pngquant)

PHOTO EMBED

Thu Oct 07 2021 08:58:45 GMT+0000 (UTC)

Saved by @GoodRequest. #react

import gulp from 'gulp'
import imagemin from 'gulp-imagemin'
import optipng from 'imagemin-optipng'

gulp.task('optimize-png-images', () => {
	return gulp.src('./build/static/media/*.png')
		.pipe(imagemin([
			pngquant({
				quality: [0.2, 0.2],
				speed: 1
			})
		]))
		.pipe(gulp.dest('build/static/media/'))
})
content_copyCOPY