A drop-in replacement for React Native's <Image> and <ImageBackground> components that automatically caches remote images to local storage with configurable expiration (default 1 week). Version 1.0.7 is the latest stable release. It uses rn-fetch-blob for file system access and supports prefetching, cache deletion, and cache directory customization. Unlike other caching solutions, it mimics the exact Image/ImageBackground API and supports base64 data caching. Requires React Native project and rn-fetch-blob peer dependency.
npm install react-native-image-cache-wrapperNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage of CachedImage with a remote image source and 1-hour cache expiration.
Run 'npm install rn-fetch-blob --save' and link (for RN < 0.60).
Upgrade to v1.0.2 or later and replace react-native-fetch-blob with rn-fetch-blob.
Install 'rn-fetch-blob@0.10.16' if using RN 0.60+.
Use 'import CachedImage from ...' (no curly braces).
Pass success and fail callbacks as arguments.
Run npm install rn-fetch-blob --save
Change to import CachedImage from 'react-native-image-cache-wrapper'
Ensure rn-fetch-blob is properly linked: react-native link rn-fetch-blob (or autolink on RN 0.60+)
Update to v1.0.7: npm install react-native-image-cache-wrapper@1.0.7