ui-expo-image — Claude Code rule: what it does, how to install
ui-expo-image is a Claude Code rule that swaps React Native's default Image for expo-image. It guides code generation toward blurhash placeholders, disk caching, and list recycling.
AGPL-3.0 ★ 88 updated 2026-11-17
.claude/rules/ui-expo-image.mdWhat ui-expo-image does
This rule instructs the assistant to import Image from expo-image rather than react-native. The change prevents memory spikes inside scrollable feeds and introduces smooth fade-in animations via transition.
Code samples define specific rendering attributes: blurhash strings in placeholder, scaling via contentFit, loading order through priority, and storage targets in cachePolicy. It also specifies recyclingKey to keep list scrolling performant.
For shared web and mobile setups, the guideline mandates SolitoImage from solito/image.
What it helps with
- replace React Native Image with expo-image
- configure memory and disk caching via cachePolicy
- add blurhash placeholders during image fetch
- maintain list recycling performance using recyclingKey
- implement cross-platform SolitoImage for web and native builds
Example prompts for the agent
- Build an avatar component with a smooth fade-in transition
- Create a hero image with a blurhash placeholder and memory-disk caching
- Implement a cross-platform image using SolitoImage
How to install ui-expo-image
Manually: put the files in place
.claude/rules/ui-expo-image.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/ui-expo-image.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/ui-expo-image.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/ui-expo-image.mdManually: put the files in place
.clinerules/ui-expo-image.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about ui-expo-image
How to install ui-expo-image in Claude Code?
Add the rule file at .claude/rules/ui-expo-image.md in your repository root.
What does ui-expo-image do?
It directs the AI to use expo-image instead of standard React Native Image, configuring caching, fetch priority, and blurhash placeholders.
What should be used for cross-platform web and native support?
The rule instructs to use SolitoImage from solito/image, which wraps expo-image for shared codebases.