#does tauri automaticly bundle images or i need to ship the executable with the assets ?
20 messages · Page 1 of 1 (latest)
If you are talking about images in Tauri folder, you need to include them in tauri.config.json resources list, you can find it here https://tauri.app/v1/guides/building/resources/
If you want you can still include resources inside of Rust code (but that will make bundle huge) with include_bytes macro
both would execute in build time
if i use the tauri.config.json will it be bundeled in the executable ?
and why include_bytes is huge ? is it because the code behind it is conplex or what ?
if you use tauri.config.json resources it will be only included in installation so when user install your app. If you want Portable version of the app, it will not be included in .exe file.
include_bytes as the name says includes bytes of whatever you want inside of Rust 😄 so depending of size of image/images in bytes it will grow proportionally, making single .exe (portable) larger
what installer do you sudjest to use
if your app is not offline only, you can also try loading those resources on the fly
its not online but the images dont change, there are a constant static number of images
max 5mb
tauri build will depending on platform generate installers like pkg for macos, msi for windows ... and so on
is it used in FE part of app (JS) or just Rust side?
I mean you can add that as part of executable, that is not large
i am using nextjs so images in the nextjs part are handeled by nextjs right ?
if you are using those in nextjs you can bundle them with nextjs, they will be then bundled inside of exe with tauri from dist folder of nextjs app
thanks for the help !
like public folder where you define static images, they will be embedded on build time of nextjs
np
its inside app folder, will it also work ?
I think so