react-native-img-cache icon indicating copy to clipboard operation
react-native-img-cache copied to clipboard

support display local image

Open zhangwilling opened this issue 7 years ago • 2 comments

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

zhangwilling avatar Aug 23 '18 10:08 zhangwilling

i create a pr at https://github.com/wcandillon/react-native-img-cache/pull/104 to enhance the lib.

zhangwilling avatar Aug 23 '18 10:08 zhangwilling

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!

wumke avatar Jul 12 '19 10:07 wumke