Forum Discussion
abonstrom
Staff
5 years agoHi tomkcook,
Yes it is possible to add an image URL to your OpenAPI docs to render in SwaggerUI. OpenAPI supports markdown and renders images for you. Here is a markdown guide, specifically how to add images: https://www.markdownguide.org/basic-syntax/#images
The following is an example of an image of a bear that can be rendered in SwaggerUI.
## Images

Let me know if this helps!
tomkcook
5 years agoNew Contributor
Thanks. Tracked this down to two separate issues in the end:
- My GFM was incorrect - using square brackets instead of parentheses for the URL.
- I'm using flask_swagger to generate the OpenAPI. Because this scans docstrings, it's usual to have extra indentation at the beginning of each line. In certain cases, flask_swagger doesn't strip this out and so my image link was being treated as preformatted text.