georstat/react-native-image-cache

Support pre-fetching?

Closed this issue · 7 comments

Hi,

Are you planning on supporting pre-fetching of images in this library, or is this possible now in some way?

Thank you. :)

Hi @martinmidtsund, can you give us a small example of what you’re trying to achieve?

@efstathiosntonas Thanks for your quick reply!

I would like to prefetch/preload an image by URL before the screen that will show that image to the user are navigated to. Sometimes the image will not have the time to finish before navigation, but it would have a head start so the image would load even faster (or so the user would believe).

It's like the functionality already in React Native's Image-component (https://reactnative.dev/docs/image#prefetch) , or in the Fast Image library (https://github.com/DylanVann/react-native-fast-image#fastimagepreload-source--void)

@martinmidtsund @geobako let’s do this, @geobako do you have an ETA?

Hi guys, I think it will be ready in two weeks as we are on holiday right now

Wow, great news guys, will be exciting to test! Have a good vacation :)

Hi @martinmidtsund, please update to 2.1.0, we've added prefetch. More info on README

Hi @efstathiosntonas

Cool, I'll test it as soon as I can! 🤩