[Bug] Adding local images does not work
hffmnn opened this issue · comments
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
When trying to show a local image by adding it's path to a markdown file, it doesn't get rendered/added to the output.
Steps to reproduce
- Write you e.g. service documentation
- Add a image to you service directory e.g.
.../NotificationService/infrastructure.png
- Add the image to the
index.md
file via `
Expected behavior
It renders the image in dev and production builds.
Actual behavior
It renders the alt text, but no image is shown.
Your environment
- EventCatalog version used:
0.6.8
- Environment name and version: Firefox 115.0
- Operating system and version: macOS Ventura 13.4.1
Did you try adding the image to the public directory? We have images in our documentation and it works fine. For example, in our event (index.md) documentation we have this:
- File:
eventcatalog/domains/Example/events/ExampleEvent/index.md
Status flow:
<img alt="header" src="/assets/ExampleEvent/status_flow.svg" />
And then we created an assets
directory inside the public
directory, and added the image there:
- File:
eventcatalog/public/assets/ExampleEvent/status_flow.svg
thanks for your support. It tackled it again today (knowing now that it somehow has to work) and now it does :)
The solution was a combination of different things:
- I used the markdown image syntax (
![Alt Text](link to image)
) which doesn't seem to work at all - We changed the
basePath
prop ineventcatalog.config.js
so for us thesrc
prop is sth like/<basePath>/assets/some_image.png
Thanks again for your support