SVG images cannot be displayed #17511
-
I have tried the following paths:
Only using absolute paths can make SVG display normally. PNG images can be displayed normally using ms-appx:///Assets/copyleft.svg.png. I have tried using WinUI 3 and Skia, both have the same problem. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @intzaaa, when you add an SVG to your project, it is automatically converted via our Resizetizer for best performance. Using the PNG is the recommended way for consistent image rendering across all platforms. You should be able to use it with just If you still want to display the SVG image directly, you can set the build action of the SVG file to |
Beta Was this translation helpful? Give feedback.
Hey @intzaaa, when you add an SVG to your project, it is automatically converted via our Resizetizer for best performance. Using the PNG is the recommended way for consistent image rendering across all platforms. You should be able to use it with just
ms-appx:///Assets/copyleft.png
.If you still want to display the SVG image directly, you can set the build action of the SVG file to
Content
, and you should be able to reference the SVG. Here are our docs for more details: https://platform.uno/docs/articles/external/uno.resizetizer/doc/using-uno-resizetizer.html?tabs=singleproject%2CAndroid#using-svg-images-vs-png-images-with-svg-underneath