UPDATE: through working with Atlassian Support I have found that some svg files render in markdown and some do not. For example, this one renders file:
![kiwi](https://s.cdpn.io/3/kiwi.svg)
and when I copy this file into my repo and refer to it via relative path, it works as well.
The svg files that are not rendering in Bitbucket markdown (but do load just fine in chrome and other image viewers) are the ones I export as svg from draw.io. I will look into the differences in these files, but please let me know if you have experience with this issue.
-------------------------
Of course, I've seen the Markdown Syntax Guide that describes how to link to images in a repo, but their example uses a jpg and there is no mention of what other image types can be rendered.
Please advise. This is not answered anywhere in the documentation or community here that I can find.
I have tried png which seems to work, but would like to embed a svg since it's smaller, but it does not seem to work. My ultimate goal here is to get svg support in markdown so that I can embed draw.io diagrams in markdown documents on bitbucket. Draw.io supports exporting diagram files to small graphics formats like svg and png, with the actual drawing details embedded in the file, so the diagram file in the repo becomes the single source of truth for the drawing and you don't have to mess with exporting and duplicate files.
Turns out the only svg files that aren't rendering for me are ones that I export as svg from draw.io, when I do not “Embed images”. This results in an svg with <image> elements with no content. I imagine Bitbucket markdown doesn’t handle this well (even though I can view the same image files in chrome or any other image viewer just fine - it just shows the embedded image as a default placeholder).
Details on the experiments I did here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.