-
Notifications
You must be signed in to change notification settings - Fork 356
Issue 328 ios fix image loading using uri or path #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 328 ios fix image loading using uri or path #381
Conversation
Use RCTConvert & RCTUmageLoader in order to load images correctly with path and uri
de607fc to
8d707ac
Compare
README.md
Outdated
| | options.onlyScaleDown | If `true`, will never enlarge the image, and will only make it smaller. | | ||
| # Limitations | ||
|
|
||
| - If you are using `@react-native-camera-roll/camera-roll` **with new architecture enabled this library is not going to work**. If you try to display an image with the `uri` of the library using `<Image />` you are going to have the following error: `No suitable image URL loader found for ph://...`. This error come from the ReactNative `ImageLoader`, which is the one we are currently using. Help/PR for solving this are welcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment using react-native-image-picker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inside @react-native-camera-roll/camera-roll you have a util method that permit to load ph images and convert them into local images
8d707ac to
78d4350
Compare
Problem
This fix the issue #328.
iOS was only accepted
uriusing schemefile://. This is a regression from version <3.x.x.Solution
The solution was to use the React-Native url converter & image loader in order to handle both
path&uri(with several protocol/scheme).Test
This PR also add several image sources in the example application using:
react-native-image-picker;react-native-vision-camera;@react-native-camera-roll/camera-roll;http://.....);