Replies: 3 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
-
Opened new topic, because this is not the reason for not displaying the images |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently in the process of switching from
dioxus v 0.5.x
todioxus v 0.6.x
in my project. I have the problem that my images and icons that I use in my UI are no longer displayed.So far I have always maintained the additional images and other resources in a
res
directory. Theres
directory always had to be on the same directory level as the binary.Basically, I like the idea that I can now integrate the static resources previously used externally into the binary using the
asset!
macro. However, there is still one step missing in the documentation and I am hoping for your valued support. I have already worked through the Assets Guide and the Tutorial, but unfortunately it does not work for me as it is described there.I have started to create the first resources as assets in an
assets.rs
file:In my UI, I use these new assets as follows:
If I compile my application using
cargo run
, the application starts. The configured css file is accepted. The absolute paths to the images on my system are shown in the inspector. The files are found but not displayed. In the inspector I can see underNotwork
that this message appears in the Security tab:If I start the binary from the
target/debug
directory, the paths are different and the images are not found. When I open the inspector, I see this information in theConsole
tab:In the
Network
Tab the links look like this:How can I ensure that the required resources are found and displayed?
Beta Was this translation helpful? Give feedback.
All reactions