Allow choosing multiple images in ImagePicker.
closed
Jesper Madsen
It would be awesome if it was possible to choose an array of images from the photo library at once. As soon as you want to add more than one image to your app, it creates a lot of friction for the user to re-enter and 're-search' his/her library for the next images. It would support quite a few use cases for the ImagePicker component in my opinion :)
Natanel Yosef Soussana
i struggle with it too but then decide to release a package
https://www.npmjs.com/package/expo-images-picker
enjoy.
Marek Štefanec
any update?
Marcos Fuenmayor
Hey! check this library:
Oluwaseyi Oyebanji
Marcos Fuenmayor: This is very very helpful kudos to you
Wodin
Try this:
You will need to use EAS Build to build a development client to use instead of Expo Go.
Also, you will need to build the production app with EAS Build.
There's no config plugin needed. You just need to add the necessary iOS permissions in
ios.infoPlist
in app.json
and also the Android permissions in android.permissions
.Brent Vatne
Wodin: this also adds support for selecting multiple images but only on ios 14+ https://github.com/expo/expo/pull/18142 (android already supported)
Wodin
See https://github.com/wodin/expo-multi-image-picker for an example based on the RN Multiple Image Picker example
JcbPrn
Wodin:it isn't opening for me. I installed using
yarn add @baronha/react-native-multiple-image-picker
. is there anything more to do? If I log I get this message `null is not an object (evaluating 'MultipleImagePicker.openPicker')
at node_modules/@baronha/react-native-multiple-image-picker/src/index.js:73:50 in Promise$argument_0
at node_modules/@baronha/react-native-multiple-image-picker/src/index.js:71:23 in Promise$argument_0
at node_modules/@baronha/react-native-multiple-image-picker/src/index.js:71:11 in exportObject.openPicker
Wodin
JcbPrn: You cannot run it in Expo Go. You will need to build a development client with
eas build -p ios --profile development
. Also, you will need to build the production version with eas build -p ios --profile production
. It will not work with the classic expo build
.JcbPrn
Wodin: thanks for the fast reply. it is still not openig on production builds.
Wodin
JcbPrn: How did you build the production build?
JcbPrn
Wodin: using eas build the build failes because of this package. Expo build works fine, but the picker isn‘t opening.
Wodin
JcbPrn: I built successfully with
eas build
. While the build might work with expo build
, the resulting app will definitely not work, because it will not include the native code needed by this dependency and you will get errors like "null is not an object".JcbPrn
Wodin: means I need to eject to use this package I guess. I am trying to avoid that.
Wodin
JcbPrn: No. You do not need to eject. All you need to do is build with
eas build
instead of expo build
.See https://github.com/wodin/expo-multi-image-picker. This is a managed app that builds with
eas build
and the resulting app works.If you get an error when doing that, then post a message to forums.expo.dev explaining what dependencies you're using and what error you get when you try to build.
M
Md. Habibur Rahaman
Anybody found any alternative?
Carlos Devia
We too! It's breaking the UX when you need to select multiple files... btw.. did someone find an alternative in the meantime?
0xadams.eth
It would be really great to have this feature in managed workflow
chelsie Rosenberg
5 years later and nothing...it’s the one feature my app is missing and I now have to eject, I can only assume it’s because there are other priorities but man it’s a pain
Wodin
chelsie Rosenberg: If you eject, what package will you use to implement this?
Hirbod
Wodin: I went with a custom dev client and this one here:
Nate Laffan
(Deleted. Was venting.)
Koray KIRCAOGLU
Just a reminder, this feature still needed, 3rd party libraries does not support "select more photos" feature for iOS
Natanel Yosef Soussana
Koray KIRCAOGLU:
Koray KIRCAOGLU
Thank you Natanel Yosef Soussana for your hardwork, I'm aware of your library. But my reasonings are like below.
- It isn't native
- There is no option to manage selected photos
- Even if I implement adding more photos, it does not reflect instantly but instead I, need to re-render the component.
Load More
→