react-native-img-cache
react-native-img-cache copied to clipboard
support display local image
This is an enhancement.
some images are not remote, such as '/private/var/mobile/Containers/Data/Application/33750DB7-00A8-4537-837D-7747800EB4B5/tmp/react-native-image-crop-picker/459488B7-E263-4325-95DC-AD539779FBAC.jpg'
we can judge if image source is a remote at here. https://github.com/wcandillon/react-native-img-cache/blob/c4ffc423acc006beb7d12827cf2ff7b289e6229c/src/index.tsx#L177
If the image is local, we don't need to invoke download function and notify.
https://github.com/wcandillon/react-native-img-cache/blob/c4ffc423acc006beb7d12827cf2ff7b289e6229c/src/index.tsx#L97
i create a pr at https://github.com/wcandillon/react-native-img-cache/pull/104 to enhance the lib.
Imho it is useless to handle local files in a component that you pulled in to handle cache... instead that should be a simple new component that judges to use default Image or CachedImage when remote url!