Summary
The
Image
component in
@expo/ui/swift-ui
currently supports:
  • systemName
    (SF Symbols)
  • assetName
    (Custom SF Symbols / Symbol Sets)
  • uiImage
    (local file URI)
However, there is currently no way to display bundled image assets such as PNG files included in the app.
Use case
When building widgets with
expo-widgets
, it's common to use custom illustrations, mascots, or branded graphics instead of SF Symbols.
For example, I have a bundled asset:
src/assets/widgets/mo-with-cup.png
In React Native, this can be displayed with:
<Image source={require('./mo-with-cup.png')} />
There doesn't appear to be an equivalent API in
@expo/ui/swift-ui
.
Suggested improvement
It would be great if
@expo/ui/swift-ui
exposed the equivalent of SwiftUI's
Image("assetName")
API for bundled assets.
For example, a JavaScript API could look like:
<Image imageName="mo-with-cup" />
or any other API that allows displaying bundled image assets. The exact API design is less important than exposing the underlying SwiftUI capability.
Why this would help
This would make it much easier to build widgets with custom illustrations, mascots, branded graphics, and other bundled assets without requiring
file://
URIs or converting images into custom SF Symbols.