react-nativewebviewreact-native-camerareact-native-webviewcamera-roll

Opening a file with a PHAsset URI from a Webview


From the camera roll, I get a list of URIs in the ph://xxxxx format.

If I use these URIs in Image or ImageBackground components everything works as expected.

I want to show these photos in a webview. Adding to the html an img tag with that kind of URI doesn't work.

Am I missing something? Is there any workaround to display such images in a webview?


Solution

  • For anyone interested, after trying various solutions, it doesn't seem to work at the time of writing. I solved getting the absolute path of the image, which in my case meant copying the file from the cameraroll to the app document directory.