Open bexoss opened 6 years ago
Hey @bexoss What do you mean "the image become empty"? You get a blank image? Can you see that the new image is being downloaded?
Let's try to get more details so we can work this out
It's a bit hard to replicate this kind of thing without a server..
Also, this might be related https://github.com/kfiroo/react-native-cached-image/issues/47
@bexoss: i think you should manage user's profile image version by redux state in client.
Then append suffix query in uri like http://myapp.com/user001?v=this.props.avatar_version
When profile image changed, increase avatar_version value, image should recached
@bexoss @redwind This is indeed an issue with this lib right now, suggestions for handling this internally are most welcome!
Thanks for sharing fantastic library. I got stuck with managing profile picture. The cached image looks like working well, but if the user change his profile picture the image won't be refreshed.
Let's suppose there is a profile screen using
CachedImage
.<CachedImage source={{uri: 'http://myapp.com/user001'}} />
If a user change profile picture, server will get his picture and overwrite it. (Because it saved with user name).
At this point,
local cached profile image
andserver's profile image
is different. right? And then how can I notice to device?
I tried when I success upload new image, remove cached image using
cachedImageProvider
, If I do that the image become empty. And without this, the image won't changed to latest one. How can I use it properly? It is because of redux problem?Now I am using like this... <CachedImage source={{uri: this.props.user.profileImageRef}} />