Skip to main content

expo-image

Version: 55.0.3 A cross-platform, performant image component for React Native and Expo with Web support. Provides better performance, caching, and loading states than React Native’s Image.

Installation

Usage

API Reference

Image Props

ImageSource
required
Image source (URI, require(), or blurhash)
string | number
Placeholder shown while loading (blurhash or local image)
'cover' | 'contain' | 'fill' | 'none' | 'scale-down'
default:"cover"
How the image should be resized to fit its container
string | object
Position of the image within the container
number | object
Transition duration in ms
'none' | 'disk' | 'memory' | 'memory-disk'
default:"memory-disk"
Image caching policy
'low' | 'normal' | 'high'
default:"normal"
Loading priority
() => void
Called when image loads successfully
(error: ImageErrorEvent) => void
Called when image fails to load

Methods

(urls: string[]) => Promise<void>
Preloads images into cache
() => Promise<void>
Clears memory cache
() => Promise<void>
Clears disk cache

Examples

Basic Image

With Placeholder

Responsive Images

Prefetch Images

Platform Support

Resources