Compress image up to maximum size 100kb at NodeJS or React Native

0 votes
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.
May 27, 2022 in Node-js by Vaani
• 7,020 points
4,875 views

2 answers to this question.

0 votes

You can follow this link : https://www.npmjs.com/package/image-conversion 
This will have all the explanation for your question
This worked the best for me

If you need to know more about React, Its recommended to join React JS online course today.

answered May 27, 2022 by Neha
• 9,060 points
but this package doesn't support nodejs
0 votes
Image Compression in React Native is a technique used to reduce the file size of images without losing any of the quality or detail of the original. This is done by reducing the number of colors and pixels used in an image and optimizing the image for faster loading times on mobile devices. It helps to maintain a balance between image quality and size, while also improving the user experience by reducing page loading times.
React Native Image Compression is a package that is used to compress images within a React Native application. It allows developers to easily reduce the size of an image while maintaining the quality of the image. It also allows developers to reduce the memory usage of an application by compressing images to a smaller size. The package works with both PNG and JPEG images, and provides options for customizing the level of compression and the output size of the images.
answered Apr 1, 2023 by DSKView
• 180 points

Related Questions In Node-js

0 votes
0 answers

How to crop screenshot or image (.png) in nodejs?

Consider a image file .png Consider you have ...READ MORE

Jun 21, 2022 in Node-js by Vaani
• 7,020 points
377 views
0 votes
1 answer

How to check if a collection exists in Mongodb native nodejs driver?

Hello @kartik, The collectionNames method of the native driver's Db object accepts ...READ MORE

answered Nov 27, 2020 in Node-js by Niroj
• 82,880 points
13,669 views
0 votes
1 answer

How to reload or re-render the entire page using AngularJS?

Hello @kartik< For the record, to force angular ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,576 views
0 votes
1 answer

How to extract request http headers from a request using NodeJS connect?

Hello @kartik, To see a list of HTTP ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,880 points
22,272 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,663 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,129 views
0 votes
1 answer

NodeJS - Upload ~36MB file to VirusTotal failing

The VirusTotal file/scan API request has a ...READ MORE

answered May 27, 2022 in Node-js by Neha
• 9,060 points
553 views
0 votes
1 answer

How to host MEAN stack application with Angular and nodejs on windows IIS

It's fine that you're using Angular. Be ...READ MORE

answered May 27, 2022 in Node-js by Neha
• 9,060 points
1,009 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP