A react native plugin to lazy load image with loading indicator and show default image if something goes wrong with image path and resolve image issues and much more
using either Yarn:
yarn add react-native-lazy-load-image
or npm:
npm install react-native-lazy-load-image
import { LazyLoadImage } from 'react-native-lazy-load-image';
<LazyLoadImage source={{uri: 'https://via.placeholder.com/640x360'}} />
- Show loading before image being ready to load.
- Show default image if there is any error in image path.
- Auto width/height applied if no width/height in given.
- Image all props supported.
- ImageBackground supported.
- Expo supported.
It accepts all the Image props and also some extra props too.
Color of loading indicator
Remote url to load the default image if something goes wrong with source image.
local path for default image if something goes wrong with source image.
Need loading indicator while image getting ready to load default (true)
Need auto width height of image default (true)
Need extra image styling
If you want to use ImageBackground then set background to true, default if false