mirror of
https://github.com/status-im/react-native-image-resizer.git
synced 2025-02-05 11:23:21 +00:00
parent
37642cf4f3
commit
2680941ae0
@ -49,7 +49,9 @@ A basic, sample app is available in [the `example` folder](https://github.com/ba
|
||||
|
||||
### `promise createResizedImage(path, maxWidth, maxHeight, compressFormat, quality, rotation = 0, outputPath)`
|
||||
|
||||
The promise resolves with a string containing the uri of the new file.
|
||||
The promise resolves with a string containing the URI of the new file. This URI can be used directly as the `source` of an [`<Image>`](https://facebook.github.io/react-native/docs/image.html) component.
|
||||
|
||||
> :warning: On Android, `file:` will be prepended to the returned string. This allows it to be displayed as an image, but it also means you [won't be able to access the file directly](https://github.com/bamlab/react-native-image-resizer/issues/50) when using a utility like `fs`. To do so, you can simply use `rawPath = originalPath.replace('file:', '')` to get the raw path.
|
||||
|
||||
Option | Description
|
||||
------ | -----------
|
||||
|
Loading…
x
Reference in New Issue
Block a user