ascoders / react-native-image-viewer

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

[Feature] Allow to ignore prefetching logic and just render the image elements #387

Open nadav2051 opened 4 years ago

nadav2051 commented 4 years ago

First of all, thank you for this great library!

I'm using the renderImage hook to render my images using Fast Image library, which handles it's own caching, after diving a bit into this library code I see there's 'loading' status for each image, I'd like to ignore it and assume each image was already as I want Fast Image to handle loading.

I'd like to see some prop that allows me to bypass the inner logic of prefetching/loading the image (it prefetches the image using the Image API, which I'm not using to actually render the picture)

davx1992 commented 4 years ago

@nadav2051 if you will set width and height in dataset of images, it will skip prefetching.