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}
    link
    fedilink
    39
    edit-2
    2 months 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
      link
      fedilink
      English
      24
      edit-2
      2 months 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.

        • Admiral Patrick
          link
          fedilink
          English
          42 months ago

          Nice. I figure all the web-based ones should unless they’ve got a static list of image types that doesn’t include svg. The installed apps could be hit or miss depending on how they’re implemented.