Skip to content

Load folder as asset / make 800+ images availiable on frontend only? #3672

Answered by ealmloff
TheGrinchOnMath asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can include a whole folder with the asset macro like this:

let folder = asset!("path/to/local/folder");
let file = format!("{folder}/file/within/folder.png");

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TheGrinchOnMath
Comment options

@ealmloff
Comment options

Answer selected by TheGrinchOnMath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants