Update gulp image minification task
|
@ -15,7 +15,7 @@ var uglify = require('gulp-uglifyjs');
|
||||||
var jshint = require('gulp-jshint');
|
var jshint = require('gulp-jshint');
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
var imagemin = require('gulp-imagemin');
|
var imagemin = require('gulp-imagemin');
|
||||||
var pngquant = require('imagemin-pngquant');
|
var imageminMozjpeg = require('imagemin-mozjpeg');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -74,9 +74,11 @@ gulp.task('jslint', function() {
|
||||||
gulp.task('images', function () {
|
gulp.task('images', function () {
|
||||||
return gulp.src('images/*')
|
return gulp.src('images/*')
|
||||||
.pipe(imagemin({
|
.pipe(imagemin({
|
||||||
|
optimizationLevel: 7,
|
||||||
progressive: true,
|
progressive: true,
|
||||||
svgoPlugins: [{removeViewBox: false}],
|
interlaced: true,
|
||||||
use: [pngquant()]
|
svgoPlugins: [{removeViewBox: true}],
|
||||||
|
use: [imageminMozjpeg()]
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('images'));
|
.pipe(gulp.dest('images'));
|
||||||
});
|
});
|
||||||
|
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 410 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 332 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 450 KiB After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 745 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 397 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 58 KiB |
|
@ -25,7 +25,9 @@
|
||||||
"gulp-sass": "^2.2.0",
|
"gulp-sass": "^2.2.0",
|
||||||
"gulp-uglify": "^1.5.3",
|
"gulp-uglify": "^1.5.3",
|
||||||
"gulp-uglifyjs": "^0.6.2",
|
"gulp-uglifyjs": "^0.6.2",
|
||||||
"imagemin-pngquant": "^4.2.2",
|
|
||||||
"jshint": "^2.9.1"
|
"jshint": "^2.9.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"imagemin-mozjpeg": "^5.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|