Gathering detailed insights and metrics for @nomi9995/react-native-image-compressor
Gathering detailed insights and metrics for @nomi9995/react-native-image-compressor
Gathering detailed insights and metrics for @nomi9995/react-native-image-compressor
Gathering detailed insights and metrics for @nomi9995/react-native-image-compressor
It is now deprecated in favor of react-native-compressor.
npm install @nomi9995/react-native-image-compressor
Typescript
Module System
Node Version
NPM Version
42
Supply Chain
51.9
Quality
69.2
Maintenance
100
Vulnerability
96.7
License
Objective-C (39.96%)
Java (31.74%)
JavaScript (17.14%)
Starlark (5.75%)
Ruby (5.42%)
Total Downloads
5,625
Last Day
2
Last Week
7
Last Month
26
Last Year
266
11 Stars
15 Commits
3 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Apr 22, 2025
Minified
Minified + Gzipped
Latest Version
0.0.3
Package Id
@nomi9995/react-native-image-compressor@0.0.3
Unpacked Size
100.44 kB
Size
63.06 kB
File Count
26
NPM Version
8.15.0
Node Version
16.17.0
Published on
Oct 08, 2023
Cumulative downloads
Total Downloads
Last Day
100%
2
Compared to previous day
Last Week
16.7%
7
Compared to previous week
Last Month
8.3%
26
Compared to previous month
Last Year
-36.5%
266
Compared to previous year
2
2
react-native-image-compressor is now deprecated in favor of react-native-compressor.
A simple image resizing and compression package, taking care of the resizing process on the native side. Supports iOS and Android out of the box.
$ npm install @nomi9995/react-native-image-compressor --save
$ yarn add @nomi9995/react-native-image-compressor
$ react-native link @nomi9995/react-native-image-compressor
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-image-compressor
and add TRNReactNativeImageCompressor.xcodeproj
libTRNReactNativeImageCompressor.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainApplication.java
import com.nomi9995.imagecompressor.TRNReactNativeImageCompressorPackage;
to the imports at the top of the filenew TRNReactNativeImageCompressorPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':@nomi9995_react-native-image-compressor'
project(':@nomi9995_react-native-image-compressor').projectDir = new File(rootProject.projectDir, '../node_modules/@nomi9995/react-native-image-compressor/android')
android/app/build.gradle
:
implementation project(':@nomi9995_react-native-image-compressor')
1import ImageCompressor from "@nomi9995/react-native-image-compressor"; 2 3const result = await ImageCompressor.compress( 4 "file://bowling-alleys/the-dude.jpg", 5 { 6 maxWidth: 1000, 7 } 8);
compress(value: string, options?: CompressorOptions): Promise<string>
Compresses the input file URI or base-64 string with the specified options. Promise returns a string after compression has completed. Resizing will always keep the original aspect ratio of the image, the maxWidth
and maxHeight
are used as a boundary.
maxWidth: number
(default: 1024)The maximum width boundary used as the main boundary in resizing a landscape image.
maxHeight: number
(default: 1024)The maximum height boundary used as the main boundary in resizing a portrait image.
quality: number
(default: 1.0)The quality modifier for the JPEG
file format, can be specified when output is PNG
but will be ignored.
input: InputType
(default: uri)Can be either uri
or base64
, defines the contentents of the value
parameter.
output: OutputType
(default: jpg)Can be either jpg
or png
, defines the output image format.
returnableOutputType: ReturnableOutputType
(default: uri)Can be either uri
or base64
, defines the Returnable output image format.
No vulnerabilities found.
Reason
0 existing vulnerabilities detected
Reason
binaries present in source code
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More