Hello, I added an SVG image to one of my markdown files and it is drawn with an opaque white background in Apidog. Is that by design or am I missing something?
This is what I have for it in my markdown file:
Hello, I added an SVG image to one of my markdown files and it is drawn with an opaque white background in Apidog. Is that by design or am I missing something?
This is what I have for it in my markdown file:
The appearance may vary depending on the dark/light mode theme you select. For optimal results, it is recommended to use non-transparent images to achieve the desired look in your documentation.
Hmm, that’s interesting that the recommendation is non-transparent. That makes it difficult with the gradient background used in Apidog for the dark theme. So is Apidog creating the white background image color in this case?
You can use HTML tags to achieve those effects if you want.
<img style="background-color:transparent" src="https://api.apidog.com/api/v1/projects/519583/resources/340754/image-preview" />
I have just tested it.
Awesome, thanks for the example!
my 2cents: Adding HTML is a common workaround for markdown display errors but as someone who consumes these documents in lots of different scenarios I caution turning your markdown into a markdown/html hybrid if possible. Depending on what tool is consuming the markdown document later, you might consider some sort of MD->HTML translation on the consumer side, not in the source document.
Since native Markdown syntax doesn’t support setting a background color for images, there’s currently no better way to achieve it.