I find it very weird that Lemmy support gifs but does not support svg format, is there is a specific reason for that?

  • m-p{3}@lemmy.ca
    link
    fedilink
    arrow-up
    39
    ·
    edit-2
    11 days ago

    Because the backend for media storage in Lemmy is pictrs, and svg isn’t one of the supported file format.

    That said, I wish as the instance admin that we could store some custom emojis as svg :(

    We could make them very light on resources, and easily scalable.

    • Admiral Patrick@dubvee.org
      link
      fedilink
      English
      arrow-up
      24
      ·
      edit-2
      11 days ago

      Looks like you can embed SVGs in markdown, and they render (tested in Tesseract and Lemmy-UI). So if you link them externally, support is technically there.

      Lemmy Logo SVG

      EmojiMart also supports SVG for custom emojis. So I guess if you host SVG custom emojis from a static folder, they should work as-is, though you’d need to add them to the database manually (which is a Lemmy UI limitation since it only presents an upload field rather than a URL field).

      But yeah, pict-rs seems to be the roadblock for “native” support.