react-native-photo-view: iOS unable to render local images
The images from asset-library
and local image path returned by camera is not being rendered. Works fine with remote images though. Both http
and https
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 5
- Comments: 30
Commits related to this issue
- fix 'iOS unable to render local images' #92 — committed to wolfg1969/react-native-photo-view by wolfg1969 7 years ago
I solved this in the iOS sim by prepending
file://
to my uri, although I haven’t confirmed on device yet though.The uri returned from the image picker was
So I changed my source to:
I ditched this library and unsubscribing from this thread.
@ManuBu This is my little implementation to fix the current issue - https://github.com/Warecorp/react-native-photo-view/commit/7a77dd5f519d1bf408111a9a2d21216a0d48e8d0
I didn’t implement a common approach because I am needed to show only local images (from document dir).
@srameshr Could you show your implementation or put it on GitHub? I have the same problem when getting the images using RN CameraRoll.
I created a PR (#96) for this issue.
I found the bounds (https://github.com/alwx/react-native-photo-view/blob/master/ios/RNPhotoView.m#L176) will be zero for the images with file:// uri (loaded from photo library or taken from camera). This makes the scaled image no size.