How to include local resources in mobile build of Meteor?

220 views Asked by At

relatively newbie question about meteor mobile (Android). I'm a bit lost regarding the inclusion of images and other assets into the Cordova build of my Meteor app (just so the Android app doesn't have to download the images off the server, and just include it in the build.)

I've tried pasting the same images I added in the public folder inside Cordova build folder (inside the project) but I don't think that's how it works. And another is how to use those images as a source for the img items.

The end goal is to be able to direct the img src to a local file included in the build so that it doesn't have to download it from the server.

I hope to hear some advice soon! Thank you!

1

There are 1 answers

0
Zack Newsham On BEST ANSWER

As per our discussion here: https://forums.meteor.com/t/how-to-use-webapplocalserver-localfilesystemurl-documentation-or-example/29881/2

The solution is to use a relative URL /myImage.jpg. When served via cordova this will point to the applications local storage of static resources.