Include assets in EAS Bundle

Hello there!

Im building my iOS App with eas and am facing following problem:
The assets are getting uploaded to the expo/eas servers. How can I avoid that and force the assets to be included in the bundle?

Uploading the assets leads to lots of problems in my app, like GIFs not being rendered or delays of up to 5 seconds until assets are loaded. Is there a simple way to fix this?

If not, is there a way to pre-download all assets?

Thank you in advance,
BLI

Hi @bryan.liegsalz

I haven’t tested this, but the " Local assets" documentation implies that they are already embedded in the app. But of course if you publish new images in an OTA update then they will be served from a CDN, but will be downloaded before launching the update.

You might want to look into the new Expo Image library, though. Expo SDK 48 Beta has just been released and includes a release candidate of Expo Image:

Expo Image has the ability to prefetch images.

My problem is that I have about 1000 assets. Manually prefetching them would be impossible. Is there a possibility to prefetch a directory?

And what you said about the local assets is partially true. The assets are stored locally (in the APK) in Android, but not in iOS. When built with EAS (even as a standalone bundle) it gets uploaded to the expo server.

The Expo Image Library would only partially solve my problem, but I am still looking for a way to include all assets into the bundle, thank you for your input tho!

No. But I suppose you could generate the code to prefetch the assets in a prebuild hook.

Maybe ask on https://chat.expo.dev if anyone there has an answer.

Otherwise see if there’s a solution for a plain react native app that can be applied to an Expo app.