I have essentially copy/pasted the svg example fro...
# compose-desktop
y
I have essentially copy/pasted the svg example from SVG support in the M3 milestone blog post, using my own svg file (which opens fine everywhere) and getting this:
Copy code
Image(
        painter = svgResource("images/logo.svg"),
        contentDescription = "Logo",
        modifier = Modifier.fillMaxSize(),
      )


Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Size is unspecified
	at androidx.compose.ui.geometry.Size.getWidth-impl(Size.kt:48)
	at androidx.compose.ui.geometry.Size.times-7Ah8Wj8(Size.kt:111)
	at androidx.compose.ui.res.SVGPainter.getIntrinsicSize-NH-jbRc(DesktopSvgResources.desktop.kt:80)
	at androidx.compose.ui.draw.PainterModifier.getUseIntrinsicSize(PainterModifier.kt:104)
	at androidx.compose.ui.draw.PainterModifier.modifyConstraints-ZezNO4M(PainterModifier.kt:202)
i
Oh, it is a bug 🙂 . Will fix soon. As a temporary workaround, you can specify width/height in your SVG:
Copy code
<svg xmlns:dc="<http://purl.org/dc/elements/1.1/>" xmlns:cc="<http://creativecommons.org/ns#>" xmlns:rdf="<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"
    xmlns="<http://www.w3.org/2000/svg>" width="100" height="100" version="1.1">
y
Thank you for fixing so quickly. If you still want me to file a ticket somewhere let me know.