wcandillon / react-native-expo-image-cache

React Native Image Cache and Progressive Loading based on Expo
MIT License
672 stars 125 forks source link

Image reloaded on rerender #144

Open Aryk opened 4 years ago

Aryk commented 4 years ago

Great library! But I'm having some issues with caching and rerendering. See below:

demo1

Things I checked:

The default image you see is fed as the "uri". It does not change. It has no query parameters that changes. Its just a simple public url.

Indeed it seems like the image is cached, but I'm not sure why it has to go through the fade-in effect all over again.

I even tried using React.memo around the Image component, and still same thing.

Does this happen to other people? What am i missing?

      <Image
        uri={uri}
        preview={{uri: previewUri}}
        style={{width: circleStyle.width, height: circleStyle.height}}
      />
maxyharr commented 4 years ago

Having the same issue. I don't understand the flicker. Not using preview, but also not sure how to use with cachemanager.

komelabbbas commented 4 years ago

use fadeDuration https://reactnative.dev/docs/image.html#fadeduration

rrebase commented 4 years ago

fadeDurationseems to be android only, but it happens in IOS as well. I decided to decrease transitionDuration to reduce the flicker. Has anyone solved this?

namendes commented 3 years ago

This probably due to the component you have around the Image component