nandorojo / zeego

Menus for React (Native) done right.
https://zeego.dev
MIT License
1.42k stars 41 forks source link

ItemImage with local source #51

Closed JonasHiltl closed 12 months ago

JonasHiltl commented 12 months ago

I know that Zeego currently doesn't support remote urls with with the ItemImage component. But is it possible to display an image with a local image source, so with an uri like assets://*?

JonasHiltl commented 12 months ago

Just found the solution for my problem. It is possible, but only with a url that starts with file://. Previously I tried the uri field from Asset but you have to use the localUri field from AssetInfo.

You have to set the source property to source={{ uri: localUri }} even when the typing is not up to date, but this way the image will be loaded from the local source.