Skip to content

Define SVG media upload behavior #186

Description

@xl0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions