{"_id":"expo-image-and-video-compressor","_rev":"7-15c572d6a06daaab8a8f4b717563ed20","name":"expo-image-and-video-compressor","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.3":{"name":"expo-image-and-video-compressor","version":"0.1.3","keywords":["react-native","expo","video-compression","image-compression","hardware-acceleration","mediacodec","videotoolbox","hevc","h264"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@0.1.3","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/bayut-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/bayut-video-compressor/issues"},"dist":{"shasum":"69cfeeef433de91602d71844cddcc4bf07b142a0","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-0.1.3.tgz","fileCount":36,"integrity":"sha512-GMKAh7lXf+4kEReKBF7Im8YnVtTvJago5MitxonEoDjkipjmnNt/zjwb3xS6NfVguq7urhAEPvHffn8GazrA0g==","signatures":[{"sig":"MEUCIQCRGvPRQs14e4R0OnbfLN72tes2xNkenTsdmJ1/mFQ8mwIgEOqwAAuzIQIGvEcY9k1JT09DOh1EtzwjtlKuTJHdC1E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82280},"main":"build/index.js","types":"build/index.d.ts","gitHead":"ce91868d46a8ca9eecbd9173cb145e534545cd66","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/bayut-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image and video compression for React Native / Expo with HEVC support","directories":{},"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_0.1.3_1770706845623_0.9995049661691804","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"expo-image-and-video-compressor","version":"0.1.4","keywords":["react-native","expo","video-compression","image-compression","hardware-acceleration","mediacodec","videotoolbox","hevc","h264"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@0.1.4","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"dist":{"shasum":"3250c6ded02cdc7667df362bd779a43bc3f07757","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-0.1.4.tgz","fileCount":36,"integrity":"sha512-b8DIoG7xOQn5NxXbsj4GolL1MIs6DnyvIlUld+vNr2ErIna/wJwvJcGjNtuwhL7Z7p+LppSpHi0RUhkQ0SuRWA==","signatures":[{"sig":"MEUCIGpxnrJW4gosqiuAzD0tUVEVIyyhqJceEOvOu8wthTNiAiEA/IamtErmy9ZvQrYfSTnKMtGIkSUlTHia6tcueguc8fM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82307},"main":"build/index.js","types":"build/index.d.ts","gitHead":"102861a915d701b8972ff0e95a113dcb6de74d9d","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image and video compression for React Native / Expo with HEVC support","directories":{},"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_0.1.4_1770707265515_0.880372142953342","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"expo-image-and-video-compressor","version":"0.2.0","keywords":["react-native","expo","video-compression","image-compression","hardware-acceleration","mediacodec","videotoolbox","hevc","h264"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@0.2.0","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"dist":{"shasum":"ea1d4ea710e62a646a6fee0a1c6bdb7aa2237bfb","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-0.2.0.tgz","fileCount":37,"integrity":"sha512-fG5nIRO2zPLO4VH6qJZJOHf/nucQNWbMAUdL+1QEuL7fNIClCes+VOswpm+Lh5OQrxUFmRyZGj2zmyScRLA2GA==","signatures":[{"sig":"MEUCIQCOi3/ou35Q4PLtMMHUAJIG/SAyC3UNN/rQBfl/dhVTLwIgfHmighkwyoPZDHsQIOqcpy6JnaOaETezoXfdUjtSHwA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105881},"main":"build/index.js","types":"build/index.d.ts","gitHead":"f8f37d315ea759f70b98671f0171a574a5f9082e","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image and video compression for React Native / Expo with HEVC support","directories":{},"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_0.2.0_1770708511440_0.1465062583800938","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"expo-image-and-video-compressor","version":"0.3.1","keywords":["react-native","expo","video-compression","image-compression","hardware-acceleration","mediacodec","videotoolbox","hevc","h264"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@0.3.1","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"dist":{"shasum":"f0feb52f10dbf7cd247f2b2c9a9cad1c543c70b2","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-0.3.1.tgz","fileCount":37,"integrity":"sha512-xI4f5MER93K5V79Xu4P8SbmhzsfP4YVJZlgVGZNd4gJRfNBKWK79n+Ox/yWW1JiNzc2xETbmuPWzrC0WJrB83A==","signatures":[{"sig":"MEQCIHuuXyZw9ExX7ip2XQDWVQD4nIiqnajfwKniN/lI4UDhAiBeYEcdB/GxXxgnj1enZUTXSPzdgyZtA7Ql8FFaVDopcQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105531},"main":"build/index.js","types":"build/index.d.ts","gitHead":"c46f188233b578783f3e65fe416ccc0e5e583b9f","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image and video compression for React Native / Expo with HEVC support","directories":{},"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":"*","react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_0.3.1_1770896955777_0.9653477335270866","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"expo-image-and-video-compressor","version":"1.0.0","keywords":["react-native","expo","expo-module","video-compression","image-compression","video-compressor","image-compressor","compressor","compress","hardware-acceleration","mediacodec","videotoolbox","hevc","h264","h265","media-compression","video-processing","image-processing","expo-video","expo-image","react-native-video","react-native-image","video-encoder","image-resize","media","compression"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@1.0.0","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"os":["darwin","linux","win32"],"dist":{"shasum":"945f9b724b2e44bc26e5ccd8b77859b69e9a87ba","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-1.0.0.tgz","fileCount":239,"integrity":"sha512-9Wjyri9+ViksUdRw5IXdMv22pmIOJhPleATBL3ypZDzgpFiLX5GP22k02Ge1XrhT+HIaiE5QfT45HwqCxYBHZQ==","signatures":[{"sig":"MEQCIGpB8F9butQkUUiN73KwJWBFJBDLnF/rz2tLOmthzCYZAiB641IZWRGMdqrV0HCPSMd5hQMOcguRcG5IaOorsMFWaQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1676636},"main":"build/index.js","types":"build/index.d.ts","engines":{"node":">=18"},"funding":{"url":"https://github.com/sponsors/faeizfurqan17","type":"github"},"gitHead":"a3025fc08d9e193b4513c6ccc1d1906c9a709ade","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image & video compression for React Native / Expo. H.264 & HEVC encoding via MediaCodec and VideoToolbox. No FFmpeg, no config plugins — just install and compress.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":">=51.0.0","react":">=18.0.0","react-native":">=0.73.0"},"peerDependenciesMeta":{"expo":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_1.0.0_1771911586670_0.10952886857455058","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"expo-image-and-video-compressor","version":"1.0.1","keywords":["react-native","expo","expo-module","video-compression","image-compression","video-compressor","image-compressor","compressor","compress","hardware-acceleration","mediacodec","videotoolbox","hevc","h264","h265","media-compression","video-processing","image-processing","expo-video","expo-image","react-native-video","react-native-image","video-encoder","image-resize","media","compression"],"author":{"url":"https://github.com/faeizfurqan17","name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com"},"license":"MIT","_id":"expo-image-and-video-compressor@1.0.1","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"os":["darwin","linux","win32"],"dist":{"shasum":"0523d4f56fd21c27d84c37d65b563a51b46a6082","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-1.0.1.tgz","fileCount":26,"integrity":"sha512-M2PgBDL3OCgKbgmnE6EkIhHHSKxpeX5zbxPjQKxmLo9GrfxWEALsmEX4PBW4JSUtbORIjYfGIe3XZwBZ3CVvdA==","signatures":[{"sig":"MEYCIQCuKMSig5akiOGlZTGPVlz79yJhLpBzYzL0XCN/h0jtvAIhAPuhNYLLQC/aNTjsVWE5m0xnbcgpbdTf8RTPRc8gPLvm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115118},"main":"build/index.js","types":"build/index.d.ts","engines":{"node":">=18"},"funding":{"url":"https://github.com/sponsors/faeizfurqan17","type":"github"},"gitHead":"5f4b9fe83395789ba56ffbc23fcc2b33c8bb02cd","scripts":{"ios":"expo run:ios","lint":"expo-module lint","test":"expo-module test","build":"expo-module build","clean":"expo-module clean","android":"expo run:android","prepare":"expo-module prepare","open:ios":"xed example/ios","expo-module":"expo-module","open:android":"open -a \"Android Studio\" example/android","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"repository":{"url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git","type":"git"},"_npmVersion":"10.8.2","description":"Hardware-accelerated image & video compression for React Native / Expo. H.264 & HEVC encoding via MediaCodec and VideoToolbox. No FFmpeg, no config plugins — just install and compress.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.4","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"expo":"^54.0.27","@types/react":"~19.1.0","react-native":"0.81.5","expo-module-scripts":"^5.0.8"},"peerDependencies":{"expo":">=51.0.0","react":">=18.0.0","react-native":">=0.73.0"},"peerDependenciesMeta":{"expo":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/expo-image-and-video-compressor_1.0.1_1771911885369_0.5417903695292321","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"expo-image-and-video-compressor","version":"1.0.2","description":"Hardware-accelerated image & video compression for React Native / Expo. H.264 & HEVC encoding via MediaCodec and VideoToolbox. No FFmpeg, no config plugins — just install and compress.","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"expo-module build","clean":"expo-module clean","lint":"expo-module lint","test":"expo-module test","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","expo-module":"expo-module","open:ios":"xed example/ios","open:android":"open -a \"Android Studio\" example/android","android":"expo run:android","ios":"expo run:ios"},"keywords":["react-native","expo","expo-module","video-compression","image-compression","video-compressor","image-compressor","compressor","compress","hardware-acceleration","mediacodec","videotoolbox","hevc","h264","h265","media-compression","video-processing","image-processing","expo-video","expo-image","react-native-video","react-native-image","video-encoder","image-resize","media","compression"],"repository":{"type":"git","url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git"},"bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"author":{"name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com","url":"https://github.com/faeizfurqan17"},"license":"MIT","homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","funding":{"type":"github","url":"https://github.com/sponsors/faeizfurqan17"},"engines":{"node":">=18"},"os":["darwin","linux","win32"],"sideEffects":false,"dependencies":{},"devDependencies":{"@types/react":"~19.1.0","expo-module-scripts":"^5.0.8","expo":"^54.0.27","react-native":"0.81.5"},"peerDependencies":{"expo":">=51.0.0","react":">=18.0.0","react-native":">=0.73.0"},"peerDependenciesMeta":{"expo":{"optional":false}},"_id":"expo-image-and-video-compressor@1.0.2","gitHead":"bf18d07f62f4ae77be457f3bd8f38fd4c9acadba","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-26F7QjGcZuNAB7fatpjSfkJYjOUkofgo9WlWw//4ROxNvzWBpAlnF/V9KnX2QzE7S4I5vWIThUoPt9VH1ZiHTA==","shasum":"4276cd73f5a27af86b3becf707bb4a238b6ffd8b","tarball":"https://registry.npmjs.org/expo-image-and-video-compressor/-/expo-image-and-video-compressor-1.0.2.tgz","fileCount":26,"unpackedSize":115078,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHH2Rx9PbNz0P7EBBReQeiFMsGDVLYnAMh8Fwr3wm7Q3AiAxTRnKYzhnF2RebXXbBChqc2wzZM6GYEqBQRj7x5iR0g=="}]},"_npmUser":{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"},"directories":{},"maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/expo-image-and-video-compressor_1.0.2_1779102940979_0.8756212553349771"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-10T07:00:45.622Z","modified":"2026-05-18T11:15:41.244Z","0.1.3":"2026-02-10T07:00:45.756Z","0.1.4":"2026-02-10T07:07:45.661Z","0.2.0":"2026-02-10T07:28:31.578Z","0.3.1":"2026-02-12T11:49:16.078Z","1.0.0":"2026-02-24T05:39:46.860Z","1.0.1":"2026-02-24T05:44:45.511Z","1.0.2":"2026-05-18T11:15:41.144Z"},"bugs":{"url":"https://github.com/faeizfurqan17/expo-image-and-video-compressor/issues"},"author":{"name":"Faeiz Furqan","email":"mfaeiz.furqan@gmail.com","url":"https://github.com/faeizfurqan17"},"license":"MIT","homepage":"https://github.com/faeizfurqan17/expo-image-and-video-compressor#readme","keywords":["react-native","expo","expo-module","video-compression","image-compression","video-compressor","image-compressor","compressor","compress","hardware-acceleration","mediacodec","videotoolbox","hevc","h264","h265","media-compression","video-processing","image-processing","expo-video","expo-image","react-native-video","react-native-image","video-encoder","image-resize","media","compression"],"repository":{"type":"git","url":"git+https://github.com/faeizfurqan17/expo-image-and-video-compressor.git"},"description":"Hardware-accelerated image & video compression for React Native / Expo. H.264 & HEVC encoding via MediaCodec and VideoToolbox. No FFmpeg, no config plugins — just install and compress.","maintainers":[{"name":"faeizfurqan","email":"mfaeiz.furqan@gmail.com"}],"readme":"<p align=\"center\">\n  <h1 align=\"center\">expo-image-and-video-compressor</h1>\n</p>\n\n<p align=\"center\">\n  <b>The only Expo-native video & image compressor with full hardware acceleration.</b><br/>\n  H.264 & HEVC encoding powered by MediaCodec (Android) and VideoToolbox (iOS).<br/>\n  No FFmpeg. No config plugins. No ejecting. Just install and compress.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/expo-image-and-video-compressor\"><img src=\"https://img.shields.io/npm/v/expo-image-and-video-compressor.svg?style=flat-square\" alt=\"npm version\" /></a>\n  <a href=\"https://www.npmjs.com/package/expo-image-and-video-compressor\"><img src=\"https://img.shields.io/npm/dm/expo-image-and-video-compressor.svg?style=flat-square\" alt=\"npm downloads\" /></a>\n  <a href=\"https://github.com/faeizfurqan17/expo-image-and-video-compressor\"><img src=\"https://img.shields.io/github/stars/faeizfurqan17/expo-image-and-video-compressor?style=flat-square\" alt=\"GitHub stars\" /></a>\n  <a href=\"https://github.com/faeizfurqan17/expo-image-and-video-compressor/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/expo-image-and-video-compressor.svg?style=flat-square\" alt=\"license\" /></a>\n  <img src=\"https://img.shields.io/badge/platforms-iOS%20%7C%20Android-brightgreen?style=flat-square\" alt=\"platforms\" />\n  <img src=\"https://img.shields.io/badge/Expo%20SDK-51%2B-blue?style=flat-square\" alt=\"expo sdk\" />\n</p>\n\n---\n\n## Table of Contents\n\n- [Why This Package?](#why-this-package)\n- [Upgrading to v1.0.1](#upgrading-to-v101)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [API Reference](#api-reference)\n  - [compress()](#compressfileurl-options-onprogress)\n  - [compressImage()](#compressimagefileurl-options)\n  - [cancel()](#canceluuid)\n  - [getMetadata()](#getmetadatafileurl)\n  - [activateBackgroundTask()](#activatebackgroundtaskonexpired)\n  - [deactivateBackgroundTask()](#deactivatebackgroundtask)\n- [Advanced Usage](#advanced-usage)\n- [Features](#features)\n- [Platform Support](#platform-support)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Why This Package?\n\nMost React Native compression libraries either depend on FFmpeg (adding ~9 MB to your APK), require config plugins and ejecting, or only handle images. This package is built as a **true Expo Module** — it plugs directly into the Expo module system with zero native setup.\n\n| Feature | This package | react-native-compressor | expo-image-manipulator |\n|---------|:---:|:---:|:---:|\n| True Expo Module (no config plugin) | **Yes** | No | Yes |\n| Video compression | **H.264 + HEVC** | H.264 only | No |\n| Image compression | **Yes** | Yes | Resize only |\n| Full hardware acceleration | **Yes** | Partial | No |\n| HEVC / H.265 support | **Yes** | No | No |\n| Zero config in managed workflow | **Yes** | No | Yes |\n| Speed presets (ultrafast / fast / balanced) | **Yes** | No | No |\n| Real-time progress callbacks | **Yes** | Yes | No |\n| Mid-flight cancellation | **Yes** | Yes | No |\n| iOS background task support | **Yes** | Yes | No |\n| EXIF metadata preservation | **Yes** | Yes | No |\n| Audio pass-through (no re-encode) | **Yes** | Yes | No |\n| APK size impact | **~50 KB** | ~50 KB | Part of Expo |\n\n---\n\n## Upgrading to v1.0.1\n\nIf you're on an older version (0.2.x or 0.3.x), upgrade to receive automatic compatible updates going forward:\n\n```bash\nnpm install expo-image-and-video-compressor@latest\n```\n\n> **Why upgrade?** Versions below 1.0.1 use `0.x` semver, which means `npm install` won't auto-update across minor versions (e.g. `^0.2.0` won't resolve to `0.3.x`). Starting from 1.0.1, `^1.0.1` will correctly receive all future compatible updates. The API is fully stable — no breaking changes from 0.3.1.\n\n---\n\n## Installation\n\n```bash\nnpx expo install expo-image-and-video-compressor\n```\n\nOr with npm / yarn:\n\n```bash\nnpm install expo-image-and-video-compressor\n# or\nyarn add expo-image-and-video-compressor\n```\n\n**Requirements:**\n- Expo SDK 51 or later\n- `expo-modules-core` (included with Expo SDK)\n- Works in both **managed** and **bare** workflows — no ejecting required\n\n---\n\n## Quick Start\n\n### Compress a Video\n\n```ts\nimport { compress } from 'expo-image-and-video-compressor';\n\nconst result = await compress(videoUri, {\n  bitrate: 2_500_000,   // 2.5 Mbps\n  maxSize: 1080,         // Scale down to 1080p\n  codec: 'h264',         // or 'hevc' for ~40% smaller output\n  speed: 'ultrafast',    // Fastest encoding\n}, (progress) => {\n  console.log(`Compressing: ${Math.round(progress * 100)}%`);\n});\n\nconsole.log('Compressed file:', result);\n```\n\n### Compress an Image\n\n```ts\nimport { compressImage } from 'expo-image-and-video-compressor';\n\nconst result = await compressImage(imageUri, {\n  maxWidth: 1080,\n  maxHeight: 1920,\n  quality: 0.8,          // JPEG quality (0.0 - 1.0)\n  output: 'jpg',         // or 'png'\n});\n\nconsole.log('Compressed image:', result);\n```\n\n### Cancel an In-Progress Compression\n\n```ts\nimport { compress, cancel } from 'expo-image-and-video-compressor';\n\nlet cancellationId: string;\n\nconst promise = compress(videoUri, {\n  getCancellationId: (id) => {\n    cancellationId = id;\n  },\n});\n\n// User taps \"Cancel\"\ncancel(cancellationId);\n```\n\n### Get Video Metadata\n\n```ts\nimport { getMetadata } from 'expo-image-and-video-compressor';\n\nconst meta = await getMetadata(videoUri);\nconsole.log(meta);\n// { width: 1920, height: 1080, duration: 30.5, size: 89400000, bitrate: 23000000, extension: 'mp4' }\n```\n\n### Background Compression (iOS)\n\n```ts\nimport { compress, activateBackgroundTask, deactivateBackgroundTask } from 'expo-image-and-video-compressor';\n\n// Keep compression alive when app goes to background\nawait activateBackgroundTask(() => {\n  console.log('Background time is about to expire');\n});\n\nconst result = await compress(largeVideoUri);\n\ndeactivateBackgroundTask();\n```\n\n---\n\n## API Reference\n\n### `compress(fileUrl, options?, onProgress?)`\n\nCompresses a video file using the device's hardware encoder.\n\n**Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `fileUrl` | `string` | File URI of the source video |\n| `options` | `CompressOptions` | Compression configuration (see below) |\n| `onProgress` | `(progress: number) => void` | Progress callback, value ranges from `0.0` to `1.0` |\n\n**Options:**\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `bitrate` | `number` | Auto | Target bitrate in bits per second. Auto-calculated from resolution when omitted. |\n| `maxSize` | `number` | `1080` | Maximum output dimension (width or height) in pixels. Aspect ratio is preserved. |\n| `codec` | `'h264' \\| 'hevc'` | `'h264'` | Output video codec. HEVC produces ~40% smaller files but requires iOS 11+ / Android 5+. |\n| `speed` | `'ultrafast' \\| 'fast' \\| 'balanced'` | `'ultrafast'` | Encoding speed preset. Faster = larger file, slower = better compression ratio. |\n| `minimumFileSizeForCompress` | `number` | `0` | Skip compression if the source file is smaller than this value (in bytes). |\n| `getCancellationId` | `(id: string) => void` | — | Callback that receives a unique ID. Pass this ID to `cancel()` to abort compression. |\n| `progressDivider` | `number` | `0` | Throttle progress events. `0` = report every frame, `5` = report every 5%. |\n\n**Returns:** `Promise<string>` — File URI of the compressed video.\n\n---\n\n### `compressImage(fileUrl, options?)`\n\nCompresses an image file with resize and quality control. Preserves EXIF metadata and handles orientation automatically.\n\n**Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `fileUrl` | `string` | File URI or base64 string of the source image |\n| `options` | `ImageCompressOptions` | Compression configuration (see below) |\n\n**Options:**\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `maxWidth` | `number` | `1280` | Maximum output width in pixels. Image is scaled proportionally. |\n| `maxHeight` | `number` | `1280` | Maximum output height in pixels. Image is scaled proportionally. |\n| `quality` | `number` | `0.8` | JPEG compression quality (`0.0` - `1.0`). Ignored when output is `'png'`. |\n| `output` | `'jpg' \\| 'png'` | `'jpg'` | Output image format. |\n| `input` | `'uri' \\| 'base64'` | `'uri'` | Input type — pass `'base64'` if `fileUrl` is a base64-encoded string. |\n\n**Returns:** `Promise<string>` — File URI of the compressed image. Returns the original URI if compression does not reduce file size.\n\n---\n\n### `cancel(uuid)`\n\nCancels an in-progress compression.\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `uuid` | `string` | The cancellation ID received via the `getCancellationId` callback |\n\n---\n\n### `getMetadata(fileUrl)`\n\nRetrieves metadata for a video file.\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `fileUrl` | `string` | File URI of the video |\n\n**Returns:** `Promise<VideoMetadata>`\n\n```ts\ninterface VideoMetadata {\n  width: number;       // Video width in pixels\n  height: number;      // Video height in pixels\n  duration: number;    // Duration in seconds\n  size: number;        // File size in bytes\n  bitrate?: number;    // Bitrate in bps\n  extension: string;   // File extension (e.g. 'mp4')\n}\n```\n\n---\n\n### `activateBackgroundTask(onExpired?)`\n\nActivates an iOS background task to keep compression running when the app is moved to the background.\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `onExpired` | `() => void` | Optional callback invoked when background time is about to expire |\n\n**Returns:** `Promise<string>` — Background task identifier.\n\n> **Note:** This is an iOS-only feature. On Android, compression continues in the background by default.\n\n---\n\n### `deactivateBackgroundTask()`\n\nEnds the iOS background task. Call this after compression completes.\n\n**Returns:** `Promise<void>`\n\n---\n\n## Advanced Usage\n\n### HEVC for Smaller Files\n\nHEVC (H.265) produces approximately **40% smaller files** at the same visual quality compared to H.264. Use it when targeting modern devices:\n\n```ts\nconst result = await compress(videoUri, {\n  codec: 'hevc',\n  maxSize: 1080,\n  speed: 'fast',\n});\n```\n\n> **Compatibility:** HEVC encoding requires iOS 11+ and Android 5.0+ (API 21+). All modern devices support it.\n\n### Compress Before Upload\n\nA common pattern for chat apps and social media:\n\n```ts\nimport { compress, compressImage, getMetadata } from 'expo-image-and-video-compressor';\n\nasync function prepareForUpload(uri: string, type: 'video' | 'image') {\n  if (type === 'video') {\n    const meta = await getMetadata(uri);\n    console.log(`Original: ${(meta.size / 1_000_000).toFixed(1)} MB`);\n\n    const compressed = await compress(uri, {\n      bitrate: 2_500_000,\n      maxSize: 720,\n      codec: 'hevc',\n    }, (p) => updateProgressBar(p));\n\n    const newMeta = await getMetadata(compressed);\n    console.log(`Compressed: ${(newMeta.size / 1_000_000).toFixed(1)} MB`);\n    return compressed;\n  }\n\n  return compressImage(uri, {\n    maxWidth: 1080,\n    maxHeight: 1080,\n    quality: 0.7,\n  });\n}\n```\n\n### Skip Small Files\n\nAvoid unnecessary compression on files that are already small:\n\n```ts\nconst result = await compress(videoUri, {\n  minimumFileSizeForCompress: 5_000_000, // Skip if under 5 MB\n});\n```\n\n---\n\n## Features\n\n| Feature | Description |\n|---------|-------------|\n| **H.264 & HEVC encoding** | Hardware-accelerated video encoding via platform APIs |\n| **Image compression** | JPEG and PNG compression with resize and quality control |\n| **Frame dropping** | Automatically drops frames for high-fps sources to reduce output size |\n| **Auto-scaling** | Respects aspect ratio — set `maxSize` and let the encoder handle the rest |\n| **Orientation handling** | Correctly preserves portrait and landscape orientation for both images and video |\n| **EXIF preservation** | Copies metadata from source to compressed images |\n| **Audio pass-through** | Copies the audio track without re-encoding — no quality loss |\n| **Progress tracking** | Real-time progress callbacks from `0.0` to `1.0` |\n| **Cancellation** | Cancel any compression mid-flight with a single function call |\n| **Background support** | iOS background task API keeps compression alive when the app is backgrounded |\n\n---\n\n## Platform Support\n\n| Feature | iOS | Android |\n|---------|:---:|:-------:|\n| H.264 compression | iOS 8+ | API 16+ |\n| HEVC compression | iOS 11+ | API 21+ |\n| Image compression | iOS 8+ | API 16+ |\n| Progress tracking | Yes | Yes |\n| Cancellation | Yes | Yes |\n| Background task | Yes | Native support |\n\n---\n\n## Contributing\n\nContributions, issues, and feature requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n---\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}