
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
expo-image
Advanced tools
A cross-platform, performant image component for React Native and Expo with Web support
The expo-image package is a powerful tool for handling images in Expo and React Native applications. It provides a range of functionalities including image loading, caching, and displaying images with various transformations and effects.
Basic Image Display
This feature allows you to display an image from a URL. The Image component from expo-image is used to load and display the image with specified dimensions.
import { Image } from 'expo-image';
const App = () => (
<Image
source={{ uri: 'https://example.com/image.jpg' }}
style={{ width: 200, height: 200 }}
/>
);
Image Caching
This feature enables image caching to improve performance and reduce network usage. The cachePolicy prop can be set to 'disk' to cache the image on the device's disk.
import { Image } from 'expo-image';
const App = () => (
<Image
source={{ uri: 'https://example.com/image.jpg' }}
cachePolicy='disk'
style={{ width: 200, height: 200 }}
/>
);
Image Transformations
This feature allows you to apply transformations to images, such as rounding the corners. In this example, the borderRadius style is used to create a circular image.
import { Image } from 'expo-image';
const App = () => (
<Image
source={{ uri: 'https://example.com/image.jpg' }}
style={{ width: 200, height: 200, borderRadius: 100 }}
/>
);
Image Placeholders
This feature allows you to display a placeholder image while the main image is loading. The placeholder prop is used to specify the URI of the placeholder image.
import { Image } from 'expo-image';
const App = () => (
<Image
source={{ uri: 'https://example.com/image.jpg' }}
placeholder={{ uri: 'https://example.com/placeholder.jpg' }}
style={{ width: 200, height: 200 }}
/>
);
react-native-fast-image is a performant React Native image component that supports caching, progressive loading, and image transformations. It is similar to expo-image but is known for its high performance and extensive caching capabilities.
react-native-image-progress is a React Native component that integrates with react-native-image and provides progress indicators for image loading. It is useful for displaying loading states and progress bars, which is a feature not directly provided by expo-image.
react-native-cached-image is a React Native component that provides image caching and progressive loading. It is similar to expo-image in terms of caching capabilities but also offers additional features like custom cache management.
A cross-platform, performant image component for React Native and Expo.
object-fit
and object-position
properties (see contentFit
and contentPosition
props)SDWebImage
and Glide
under the hoodFormat | Android | iOS | Web |
---|---|---|---|
WebP | ✅ | ✅ | ✅ |
PNG / APNG | ✅ | ✅ | ✅ |
AVIF | ✅ | ✅ | ✅ |
HEIC | ✅ | ✅ | ❌ not adopted yet |
JPEG | ✅ | ✅ | ✅ |
GIF | ✅ | ✅ | ✅ |
SVG | ✅ | ✅ | ✅ |
ICO | ✅ | ✅ | ✅ |
ICNS | ❌ | ✅ | ❌ |
For managed Expo projects, follow the installation instructions in the API documentation for the latest stable release.
For bare React Native projects, you must ensure that you have installed and configured the expo
package before continuing.
npx expo install expo-image
Run npx pod-install
after installing the npm package.
No additional setup necessary.
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
FAQs
A cross-platform, performant image component for React Native and Expo with Web support
The npm package expo-image receives a total of 0 weekly downloads. As such, expo-image popularity was classified as not popular.
We found that expo-image demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 27 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.