O
O
olegolegooov2019-05-25 20:28:59
JavaScript
olegolegooov, 2019-05-25 20:28:59

How to bulk compress images for a website?

Hello everyone, I
need to compress about 1k images for a site
before, when there were few images, I used tinypng, a good service, but there is a limit of 20 pcs per upload.
Now, when you need to compress 1k images, I tried to do it through gulp imagemin, but for some reason it hardly compresses, for example, 20 images on tinypng compresses by 3mb, imagemin by 240 kb.
Can you tell me how to set up gulp or maybe some other plugin for it, so that there is more normal compression?
Screenshot prntscr.com/nt9bvi
Now the settings look like this, but I tested adding various modifications to it, it did not help:

gulp.task('default2', () =>
    gulp.src('src/**/*')
        .pipe(imagemin())
        .pipe(gulp.dest('dist/images22'))
);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2019-05-25
@Kadonomaro

Try https://www.npmjs.com/package/gulp-tinypng-unlimited

O
olegolegooov, 2019-05-26
@olegolegooov

The question is relevant, can anyone tell me how to properly configure imagemin to compress close to the tinypng level?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question