If I upload an SVG file, it gets rendered on the timeline inline on desktop. Animation is also supported.
The same message appears as a raw file attachment on mobile without any preview.
Related request for another file format:
If I upload an SVG file, it gets rendered on the timeline inline on desktop. Animation is also supported.
The same message appears as a raw file attachment on mobile without any preview.
Related request for another file format:
SVG is supposed to be rendered as file: core/src/message.rs at a63f695b8553d83254b64422fe4c407f9fba6829 · chatmail/core · GitHub
This was changed in show image/svg+xml files as attachments, they typically cannot be sho… · deltachat/deltachat-core@ad044d8 · GitHub to make Android not try to render the image: Attached SVG files are not shown · Issue #263 · deltachat/deltachat-android · GitHub
Desktop ignoring the viewtype and rendering SVG inline looks like a bug, I opened GitHub · Where software is built
Thank you for pointing out the relevant implementation details. However, could you share the exact reasoning? I.e., why you think they typically cannot be shown similar to image/jpeg and so on?
It is important to disable network access via CSP and related mechanisms and scripting via putting them in a sandbox or img tag, but that is only a few lines of change. Some other messaging apps go as far as to pull in an existing sanitization library, parse the XML and output a clean one just to be sure, but that’s also just a matter of adding a dependency.
SVG could be rendered. What I’m saying is that it is a bug that some platforms render one format while others don’t, we normally try to avoid having only one platform rendering some format because then users send these files to others and expect them to be rendered as well.
yip, general goal is to support given formats cross-platform. iirc, svg is not supported by some android version. also, iirc, the svg compatibility between different libs is still poor, we need to hack around even for simple font offsets.
everything could probably be solved, but as always, it is a question of impact vs. effort.
ftr, i removed #goodFirstIssue from the title, see Have a good-first-issue tag on the forum - #2 by adbenitez for reasoning and where to start if you want to help
The #GoodFirstIssue tag is an estimate of how much work a given issue would take. I thought the declared workflow is that feature requests are discussed in the forum and then migrated to GitHub later (or solved directly).
SVG is widely supported: Can I use... Support tables for HTML5, CSS3, etc
it is not about browsers or webviews.
Android and iOS render images natively and support is needed that way. maybe it is good enough meanwhile, a while ago we checked, and it was not, see above. one could consider to open a webview for that, inlined in the message bubble, but that comes then with other issues and implications
The SVG’s built-in alttext and extended description, where present, could be rendered inline: