[] launchImageLibrary Options do not change the Video size
Author: kusche12Created May 8, 2023Updated Sep 11, 2026
Labels:bug: Bug
Description
Uploading very large video files can cause the async launchImageLibrary call to take an extraordinary long time (up to 12min for a 3gb file)
I applied the optional params as an attempt to reduce the size of the video file; however, this did not work. I then started running my own tests using the same 30s video with different options being used, and I noticed that the file size never changed.
How to repeat issue and example
Use the launchImageLibrary function to select a video from your gallery and console log the resulting file size:
const result = await launchImageLibrary(options?);
const { fileSize } = result.assets[0];
console.log(fileSize); // All file sizes are the same
FILE SIZE: 57,187,279
FILE SIZE: 57,187,279
FILE SIZE: 57,187,279
Additional Information
- Image Picker version: 5.3.1
- React Native version: 0.71.7
- Platform: iOS
- Development Operating System: MacOS, M1 chip
- Dev tools: VS Code, Expo-ejected React Native Bare Workflow, iOS Physical Device
Source: react-native-image-picker/react-native-image-picker