Skip to content

Commit 78d4350

Browse files
docs: specify with which library uri parameter has been tested
1 parent 982d42e commit 78d4350

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ A basic, sample app is available in [the `example` folder](https://github.com/ba
6464

6565
```javascript
6666
createResizedImage(
67-
path,
67+
/**
68+
* uri parameter accepts`path` or `uri`.
69+
* This property has been tested with the output of @bam.tech/react-native-image-picker,
70+
* react-native-vision-camera, @react-native-camera-roll/camera-roll and http link
71+
**/
72+
uri,
6873
maxWidth,
6974
maxHeight,
7075
compressFormat,
@@ -91,6 +96,10 @@ The promise resolves with an object containing: `path`, `uri`, `name`, `size` (b
9196
| options.mode | Similar to [react-native Image's resizeMode](https://reactnative.dev/docs/image#resizemode): either `contain` (the default), `cover`, or `stretch`. `contain` will fit the image within `width` and `height`, preserving its ratio. `cover` preserves the aspect ratio, and makes sure the image is at least `width` wide or `height` tall. `stretch` will resize the image to exactly `width` and `height`. |
9297
| options.onlyScaleDown | If `true`, will never enlarge the image, and will only make it smaller. |
9398

99+
# Limitations
100+
101+
- 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. Until then, we recommend using `react-native-image-picker`.
102+
94103
## 👉 About Bam
95104

96105
We are a 100 people company developing and designing multiplatform applications with [React Native](https://www.bam.tech/agence-react-native-paris) using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto://[email protected]) or through or [contact form](https://www.bam.tech/en/contact)!

0 commit comments

Comments
 (0)