Q
Q
quiplunar2020-07-02 01:29:41
JavaScript
quiplunar, 2020-07-02 01:29:41

Image optimization in webpack?

In my project, photos do not go through the loader, but are simply copied, I found such a plugin and decided to compare it with such a service .

As a result, in webpack the picture was compressed to 6.16 mb and through the service it was compressed to 5.5mb

The difference is very noticeable, is there something better under webpack for compressing copied images?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arseny, 2020-07-02
@quiplunar

Yes, squeeze your hands in the editor.
PS: what is 5.5 megabytes, what is 6.16 - this is archidohrena.

A
Alexander Balya, 2020-08-20
@Balya

It's not about webpack, it's about the Imagemin settings and the plugins you use.
If the size of the resulting files is important to you, look aside imagemin-guetzliand imagemin-mozjpeg. In addition, it can be used webpas an alternative to established formats.
As for me, manually using services for compressing images is inconvenient - it's better to set up the assembler once.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question