Problem
Valid image/svg+xml files are currently classified as text because SVG has no binary signature and text-content detection runs before browser MIME fallback. Before the media classifier changes, browser MIME classified SVG as an image and the original SVG could be sent directly to providers. Provider vision APIs do not consistently document SVG support.
Decide
Choose an explicit SVG contract instead of relying on generic MIME/text heuristics:
- reject SVG with a clear unsupported-format error;
- rasterize SVG to PNG before image processing/provider submission; or
- intentionally attach SVG source as text.
Acceptance criteria
- behavior is explicit and provider-safe;
- UI reports the chosen representation;
- classifier/submission tests cover
image/svg+xml;
- untrusted SVG is never injected into the DOM as raw markup.
Problem
Valid
image/svg+xmlfiles are currently classified as text because SVG has no binary signature and text-content detection runs before browser MIME fallback. Before the media classifier changes, browser MIME classified SVG as an image and the original SVG could be sent directly to providers. Provider vision APIs do not consistently document SVG support.Decide
Choose an explicit SVG contract instead of relying on generic MIME/text heuristics:
Acceptance criteria
image/svg+xml;