# SVG animates aren't rendered properly

**URL:** https://meta.discourse.org/t/svg-animates-arent-rendered-properly/366679
**Category:** Support
**Created:** [May 19, 2025, 8:51am UTC](https://meta.discourse.org/t/svg-animates-arent-rendered-properly/366679 "2025-05-19T08:51:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aas/32/289331_2.png) [@aas](https://meta.discourse.org/u/aas)
#### Post date: [May 19, 2025, 8:51am UTC](https://meta.discourse.org/t/svg-animates-arent-rendered-properly/366679/1 "2025-05-19T08:51:49Z")

</div>

I upload [this .svg](https://raw.githubusercontent.com/marionebl/svg-term-cli/refs/heads/master/examples/parrot.svg) to my post as I would any other image

 ![In a lush garden, a majestic peacock with vibrant feathers, predominantly in hues of blue and green, stands stately among blooming flowers and swaying trees, its head raised elegantly as it showcases its elaborate plumage. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/c/5/2/c5258bd4680e05fd4de52f7379e63dece17602a2.svg)

Here is what I see in the preview:

 ![CleanShot 2025-05-19 at 09.47.30@2x](https://global.discourse-cdn.com/meta/original/4X/c/7/a/c7a86839c91903fd926de75d67b43dbb318db523.png)

If I open the .svg directly in my browser (visit [https://raw.githubusercontent.com/marionebl/svg-term-cli/refs/heads/master/examples/parrot.svg](https://raw.githubusercontent.com/marionebl/svg-term-cli/refs/heads/master/examples/parrot.svg)) or view it on GitHub (here in the README.md for example: [GitHub - marionebl/svg-term-cli: Share terminal sessions via SVG and CSS · GitHub](https://github.com/marionebl/svg-term-cli/tree/master)), it is rendered properly.

.svg is enabled as an upload type and I don’t think there is an issue with the size of the .svg.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 19, 2025, 12:42pm UTC](https://meta.discourse.org/t/svg-animates-arent-rendered-properly/366679/3 "2025-05-19T12:42:33Z")

</div>

I took a quick look, and it seems that after uploading an SVG, the content inside `<defs>` is gone.

 ![The image shows the interface of an XML or SVG editor with code snippet on the left and a rendered result on the right. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/f/d/5/fd5473bf5dbbcff44b0ac8060d62c27cc9e03e65.png)

`symbol` is not on the whitelist, that’s the reason:

> <https://github.com/discourse/discourse/blob/main/lib/upload_creator.rb#L8-L32>

Now, it works:

![The image shows a Telegram download link in the chat with the filename "parrot(1)6231x0 (upload://fKaLFUt9RBvAWJoEpo5TVv0)", leading to a direct link to a hidden cdc file segment. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/3/2/432cbd0b3fc2c0b4513c27b2701be08bfeda7d6b.gif)

I don’t think there is an issue in allowing it. 🤔

* * *

Made a quick PR:

[https://github.com/discourse/discourse/pull/32806](https://github.com/discourse/discourse/pull/32806)
