How to effectively compress images?

Use gulp-imagemin to default settings. Drove 520 photos, total of about 300Mb, volume decreased by 2%. Very strange as the pictures in discord, there is 100Kb, 2Mb is all in format .jpg
I believe that a much more effective optimization should be. I was expecting a 20% interest.
Please tell me how you personally do it?
Kraken.io shakes quietly in average by 20% but he paid.
June 3rd 19 at 18:55
10 answers
June 3rd 19 at 18:57
https://github.com/google/guetzli
either put the plugin pagespeed for nginx and compress everything on the fly to webp, cached cast images.
June 3rd 19 at 18:59
Use tyniPng also friends with galpa, up to 500 images per month for nothing. If a little or you can pay to have multiple accounts and then just change the authorization key in the Assembly. Too tight, nice and tidy
June 3rd 19 at 19:01
Have ImageMagick quite a lot of keys. Some of them lead to the compression of images...
June 3rd 19 at 19:03
FileOptimizer (within 2-10% depending on format).
June 3rd 19 at 19:05
jpegoptim is a utility to optimize/compress JPEG files without loosing quality.
OptiPNG – is a small program that optimize PNG images to smaller size without losing any information.

https://www.tecmint.com/optimize-and-compress-jpeg...
June 3rd 19 at 19:07
5b596a51d82c6999180905.png
import gulp_load_plugins from 'gulp-load-plugins';
global.glp = gulp_load_plugins();
import from gulp 'gulp';
import { _path } from '../config/config.global';
import { browsersync } from './server';
import imgJpeg from 'imagemin-jpegoptim';
import imgSvg from 'imagemin-svgo';
import imgPng from 'imagemin-pngquant';

gulp.task('images', () => {
 return gulp.src([
 _path.src.img + '/**/*',
 '!' + _path.src.img + '/_favicon.png',
 '!' + _path.src.img + '/svg/{_include,_sprite}/**/*.*',
 '!' + _path.src.img + '/svg/{_include,_sprite}/*',
 '!' + _path.src.img + '/svg/{_include,_sprite}',
 ], { since: gulp.lastRun('images') })
.pipe(glp.if(!DEVMODE,
glp.imagemin([
imgJpeg({
 progressive: true,
 interlaced: true,
 max: 70,
}),
imgPng(),
imgSvg({
 removeComments: true,
 removeTitle: true,
 removeEmptyAttrs: true,
 removeHiddenElems: true,
 removeEmptyText: true,
 removeEmptyContainers: true,
 removeViewBox: false,
 convertStyleToAttrs: true,
 collapseGroups: true,
 convertTransform: true,
 removeUnknownsAndDefaults: true,
 removeNonInheritableGroupAttrs: true,
 removeUnusedNS: true,
 cleanupIDs: true,
}),
 ], {
 verbose: true
 svgoPlugins: [{ removeViewBox: false, removeTitle: true }],
})
))
.pipe(gulp.dest(_path.app.img))
 .on('end', browsersync.reload)
})
June 3rd 19 at 19:09
jpegtran
June 3rd 19 at 19:11
Maybe someone will be useful - to me the best results have been achieved in batch processing in PS CC 2018. Simply, clearly, really effective. Personally I will stay on this version to date, fully satisfied.
June 3rd 19 at 19:13
I believe that a much more effective optimization should be. I was expecting a 20% interest.
What are the parameters indicated in imageminJpegRecompress and pngquant?
With default did... - Euna_Brakus65 commented on June 3rd 19 at 19:16
June 3rd 19 at 19:15
The best there is today

When faced with a problem that came to You, immediately refused to compress images run through gulp :)
Can also try a desktop solution: Caesium.

The second did not use, but say that is a good thing :)

Good luck :)
photoshop is good clinging - Euna_Brakus65 commented on June 3rd 19 at 19:18

Find more questions by tags Gulp.js