ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.45k stars 580 forks source link

Can't load local file with prefix file:/// in IOS devices #276

Closed jothikannan closed 5 years ago

jothikannan commented 5 years ago

I am not able to see the local images in the zoom viewer, rather it is not showing any errors, getting the blank screen

File path:

screen shot 2018-12-23 at 9 53 05 pm

OutPut:

screen shot 2018-12-23 at 9 56 59 pm

I am using react native fs for storing the captured images in App's document directory and i am trying to get the path and try to use with component,

Please help

jothikannan commented 5 years ago

Fixed it myself

No need of

props: {
        source: require('path')
    }

url is enough

sajjadintel commented 5 years ago

@jothikannan can you explain how did you solved it?

Alb93 commented 4 years ago

Putting the URI directly on the url prop (same for remote urls)