Communities

(DEV) Codidact Meta
(DEV) Codidact Meta
(DEV) Writing
(DEV) Writing
Proposals
Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on Does SVG work in posts?

Post

Does SVG work in posts?

+0
−0

Does SVG work in the image upload? No. Only png, jpeg, jpg, gif (even if the wrong file extension such as png is used, svg is rejected).

Does SVG in an <img> tag work? Yes in the edit preview, and in the saved post:

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

How about in comments? (4 comments)
How about in comments?
trichoplax‭ wrote 3 months ago · edited 3 months ago
<img src="https://raw.githubusercontent.com/trichoplax/centered-hexagonal-number-animation/main/animation/centered_hexagonal_numbers.svg">

Seems not.

trichoplax‭ wrote 3 months ago

PNG image for comparison (as markdown):

![Transparent dice on a transparent background](https://a.dev.codidact.org/uploads/lzzkfp7abalcgd26x8qiojj56le8)

trichoplax‭ wrote 3 months ago

As HTML:

<img src="https://a.dev.codidact.org/uploads/lzzkfp7abalcgd26x8qiojj56le8" alt="Transparent dice on a transparent background">
trichoplax‭ wrote 3 months ago

Images in general don't seem to work in comments.