Astro Info
Astro v6.2.2
Node v24.15.0
System Linux (x64)
Package Manager bun
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
All
Describe the Bug
Astro 6.2 can not import SVG files with either zero height or width. This is useful for importing SVG filters.
Error: Could not process image metadata.
Steps to reproduce
- Create a file in src/assets/ called bug.svg
<svg width="0" height="0"></svg>
- Create a file in src/pages/ called index.astro
---
import Bug from "../assets/bug.svg";
---
<Bug/>
- Run
bun run dev
- Observe the error.
What's the expected result?
Output the SVG into the page after running optimisations defined in astro.config.mjs.
Link to Minimal Reproducible Example
https://github.com/dotnetCarpenter/astro-svg-bug
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
All
Describe the Bug
Astro 6.2 can not import SVG files with either zero height or width. This is useful for importing SVG filters.
Steps to reproduce
bun run devWhat's the expected result?
Output the SVG into the page after running optimisations defined in
astro.config.mjs.Link to Minimal Reproducible Example
https://github.com/dotnetCarpenter/astro-svg-bug
Participation