Closed Its-Just-Nans closed 6 months ago
I have almost the same error, but I do get object. But it's siblings are not having props, so even simple url to file is not working.
in dev mode it shows no images.
@Grohotun
In fact, it's when a svg doesn't have width or height specified ;)
The PR https://github.com/withastro/astro/pull/10924 add a clearer error message
@Grohotun
In fact, it's when a svg doesn't have width or height specified ;)
The PR #10924 add a clearer error message
@Its-Just-Nans setting width & height doesn't help at all.
@Grohotun
In fact, it's when a svg doesn't have width or height specified ;)
The PR #10924 add a clearer error message
@Its-Just-Nans setting width & height doesn't help at all.
Can you provide the svg ?
@Grohotun In fact, it's when a svg doesn't have width or height specified ;) The PR #10924 add a clearer error message
@Its-Just-Nans setting width & height doesn't help at all.
Can you provide the svg ?
Sure I can but in fact is doesn't matter, which svg's to use. If I use Image component for any one of them - it is loading properly.
The SVG in the repro is quite wonky, many tools can't parse it correctly. For instance, trying to paste it in https://jakearchibald.github.io/svgomg/ results in an error about it being invalid.
image-size
, the library we use, tries its best to detect that it's a SVG, but it's tough when the SVG is malformed / unusually formed.
Replacing the SVG with a more proper one (a random leaf icon I found online) works: https://stackblitz.com/edit/astro-plbyh1?file=src%2Ffiles%2Fleaf.svg
Closing as this is an upstream issue.
Astro Info
Describe the Bug
Astro glob throw unsupported files for svg
throws
unsupported file type: undefined
What's the expected result?
Detect and import svgs
Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-vexf1b