0

I want to compile one of the iced example to wasm, but it doesn't find image(ferris.png). Here's my code.

It has also package.json file with scripts to build and run page on localhost:3000(yarn build and yarn dev should be enough, but you can also run yarn build:debug and yarn dev). The problem is in line 654 - 658 in main.rs file.

if cfg!(target_arch = "wasm32") {
            // image("/wasm-test/images/ferris.png")
            // image("wasm-test/images/ferris.png")
            // image("/images/ferris.png")
            image("images/ferris.png")
}
Wiktor Kujawa
  • 595
  • 4
  • 21

0 Answers0