@amazon-devices/expo-image
v2.0.1758683737
Published
A cross-platform, performant image component for React Native and Expo with Web support
Readme
A cross-platform, performant image component for React Native and Expo.
Main features
- Designed for speed
- Support for many image formats (including animated ones)
- Disk and memory caching
- Supports BlurHash and ThumbHash - compact representations of a placeholder for an image
- Transitioning between images when the source changes (no more flickering!)
- Implements the CSS
object-fitandobject-positionproperties (seecontentFitandcontentPositionprops) - Uses performant
SDWebImageandGlideunder the hood
Supported image formats
| Format | Android | iOS | Web | | :--------: | :-----: | :-: | :-----------------------------------------------: | | WebP | ✅ | ✅ | ✅ ~96% adoption | | PNG / APNG | ✅ | ✅ | ✅ / ✅ ~96% adoption | | AVIF | ✅ | ✅ | ⏳ ~79% adoption | | HEIC | ✅ | ✅ | ❌ not adopted yet | | JPEG | ✅ | ✅ | ✅ | | GIF | ✅ | ✅ | ✅ | | SVG | ✅ | ✅ | ✅ | | ICO | ✅ | ✅ | ✅ | | ICNS | ❌ | ✅ | ❌ |
API documentation
Installation
Currently
expo-imagecan be used only with development builds, in Expo Go, and bare React Native apps with configured Expo modules. It is not available with Snack yet.
Add the package to your dependencies with the following commands:
npx expo install expo-image
npx pod-installContributing
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
