Answer the question
In order to leave comments, you need to log in
What plugin can increase the resolution of images pix / inch?
I use this task to compress and optimize the image
Using plugins
https://www.npmjs.com/package/gulp-image-resize
https://www.npmjs.com/package/gulp-imagemin
gulp.src('src/img/*.{jpg,png}')
.pipe(imageResize({
width: 240,
height: 160,
crop: true,
upscale: false
}))
.pipe(cache(imagemin({
interlaced: true,
progressive: true,
svgoPlugins: [{
removeViewBox: false
}],
use: [pngquant()]
})))
.pipe(rename({
suffix: '-240x160'
}))
.pipe(gulp.dest('app/img/collection'));
.pipe(gm(function(gmfile, done) {
gmfile.size(function(err, size) {
var w = 150;
var h = 100;
done(null, gmfile
.density(240, 240)
.resize(w, h, '^')
.gravity('Center')
.crop(w, h, 0, 0)
);
});
}))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question