Compress Image, Video, and Audio same like Whatsapp
REACT-NATIVE-COMPRESSOR is a react-native package that allows users to compress images, videos, and audio before uploading, similar to the compression algorithm used in WhatsApp. The package offers the benefit of achieving the same compression quality as WhatsApp without the need to know the compression algorithm, and it is lightweight, adding only around 50 KB to the APK size.
pod 'react-native-compressor', :path => '../node_modules/react-native-compressor'.pod install inside the ios folder.android/app/src/main/java/[...]/MainActivity.java.import com.reactnativecompressor.CompressorPackage; to the imports.new CompressorPackage() in the list returned by the getPackages() method.android/settings.gradle and android/app/build.gradle with the provided lines.REACT-NATIVE-COMPRESSOR is a powerful package for React Native developers looking to compress images, videos, and audio files before uploading, mimicking the compression quality of WhatsApp. With its lightweight design and comprehensive features, it offers an efficient solution for managing media uploads in mobile applications.