-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG rendering error - "unsupported file type" #10847
Comments
Yeah, the SVG in the repro is weird and it seems like |
Closing in favour of the upstream issue, in the meantime I'd suggest cleaning the SVG of the weird metadata. |
I have also encountered this problem. However, it does not raise The svg with error is created with obsidian plugin diagram (maybe there is style tags or other metadata in this svg). The problem turns out that the SVG detector will only match the first 1000 chars in the SVG and tells if this file is a SVG. However, the svg that draw io exported will contain a |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This issue was initially found in the Starlight repository through another issue but I'm posting a new issue here as the original issue contained other issues as well and to also include a smaller reproduction case. cc @OliverSpeir @TheGreatAxios
Rendering some SVGs (the repro link includes an example of such SVG file) using Astro's Image API, e.g. in some basic Markdown, can trigger an error.
The error is:
My initial suspicion would be this
image-size
error asimage-size
is now vendored with Astro since version4.4.0
.Downgrading Astro to version
4.3.6
fixes the issue and the SVG is rendered correctly.What's the expected result?
The SVG should be rendered correctly.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-f2xprf?file=src%2Fpages%2Fbroken.md
Participation
The text was updated successfully, but these errors were encountered: