React Native Compressor screenshot

React Native Compressor

Author Avatar Theme by Numandev1
Updated: 8 Jan 2026
1248 Stars

Compress Image, Video, and Audio same like Whatsapp

Categories

Overview

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.

Features

  • Image Compression: Compress images automatically like WhatsApp or manually with specified options.
  • Video Compression: Compress videos automatically like WhatsApp or manually based on user-defined settings.
  • Audio Compression: Offers background uploads and the ability to cancel uploads, making it convenient for managing audio files during uploads.
  • Utility Functions: Includes features for creating video thumbnails, clearing cache, retrieving metadata of images and videos, and fetching real or temporary file paths.

Installation

Managed Expo

  1. Add the Compressor plugin to your Expo config (app.json, app.config.json or app.config.js).
  2. Compile the modifications by building a new binary with EAS.

Automatic Linking (for React Native >= 0.60 only)

  • No manual linking required for React Native versions 0.60 or higher.

Manual Installation

iOS

  1. In Xcode, open Podfile and add pod 'react-native-compressor', :path => '../node_modules/react-native-compressor'.
  2. Run pod install inside the ios folder.
  3. Build the project (Cmd+R).

Android

  1. Open android/app/src/main/java/[...]/MainActivity.java.
  2. Add import com.reactnativecompressor.CompressorPackage; to the imports.
  3. Include new CompressorPackage() in the list returned by the getPackages() method.
  4. Update android/settings.gradle and android/app/build.gradle with the provided lines.

Summary

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.