No assets changed when publishing

I’m not able to upload assets with the publish command (exp publish).

I’m using the expo client to test the published bundle and the images are not shown.

I’m using the expo SDK 27.0.0 and react-native babel preset.

My assets are located under ./static/img folder.

This is an example of how I declare image elements:

<Image source={require("./static/img/**/image.png")} />

Any suggestion?

Thanks.

Hey @emanuele.cantalini,

This may not be applicable to this case, but give this a quick once over and see if it provides any help: Expo Publishing and Asset Concepts | by Adam Navarro | Exposition

Cheers,

Adam

Thanks @adamjnav for your suggestion. It has been very useful indeed.

I went for Asset.fromModule(image).downloadAsync() and it worked. Now I can see the static assets of my published project on the expo client.

What is really interesting to me is I was going to test a single require to Asset.fromModule and I suddenly got ALL the assets published (even if the log keeps saying “No assets changed, skipped.”).

Could you maybe explain this behaviour?

Also I don’t understand the follwing sentence related to caching: “For images that saved to the local filesytem, useExpo.Asset.fromModule(image).downloadAsync() to download and cache the image” (https://docs.expo.io/versions/v28.0.0/guides/preloading-and-caching-assets.html).

Why would I need to cache assets already in the file system (disk)?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.