hi team, how can i load svg image from resources d...
# multiplatform
m
hi team, how can i load svg image from resources dir in compose for WASM KMP.
k
you are suppose to convert svg -> android xml format and use it as regular drawable https://anyconv.com/svg-to-xml-converter/
l
Kamel can do it.
m
Do you know which version works with WASM
l
0.9.4-wasm should work, or the latest beta
m
Thanks will try
Hi tried Kamel is loading images but i am not able to load svg image. I also tried to convert it to XML but project doesn't have android support.
k
try to generate new project with wasm and take a look inside. it uses xml icons as well https://terrakok.github.io/Compose-Multiplatform-Wizard/
m
ok for now i used png will check this also
do you know does preview works with WASm on fleet??
w
No, we currently only support previews in desktop or common source sets.
m
ok thanks
l
what svg image?
I could check
xml is broken for wasm on the 9.4-wasm build just fyi
everything else should work
k
l
Nice. Why not move this in multiplatform-core though?
k
It will be removed from the core in the future
l
got it. 👍
364 Views