This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo Asset
A universal library that allows downloading assets and using them with other libraries.
expo-asset provides an interface to Expo's asset system. An asset is any file that lives alongside the source code of your app that the app needs at runtime. Examples include images, fonts, and sounds. Expo's asset system integrates with React Native's, so that you can refer to files with require('path/to/file'). This is how you refer to static image files in React Native for use in an Image component, for example. Check out React Native's documentation on static image resources for more information. This method of referring to static image resources works out of the box with Expo.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Configuration in app config
You can configure expo-asset using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.
Example app.json with config plugin
Configurable properties
Usage
Learn more about how to use the expo-asset config plugin to embed an asset file in your project in Load an asset at build time.
API
import { Asset } from 'expo-asset';
No API data file found, sorry!