To do so, I've looked into and tested a variety of libraries. The main goal of the work is to compress images (jpeg or png) to less than 100KB in size, regardless of their quality or resolution. It's fine if the quality and resolution are poor, but the file size should not exceed 100KB.
Is there anyone who could give me some advice?
I tried the imagemin and compress-images libraries, but they didn't compress the image very well, and I needed a result that was less than 100KB. So, despite the fact that I have a 5MB image file, I'd need it compressed to less than 100KB.