dendron: Publishing: Images do not show up with simplest publishing technique
Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you’re not sure.)
- Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
- Lookup. Dendron’s Lookup Command
- Views. Dendron Preview, Tree View, Side Panels in the UI
- Schema. Dendron Schemas
- Pod. Data import from / export to Dendron
- Publish. External Site Publish
- Markdown. Markdown features, such as syntax support and features
Describe the bug
Images that are within the repository do NOT get shown upon publishing using the simplest method of publishing (running a local server).
To Reproduce
Create a workspace with a vault that contains vault/assets/images/my-image.png
Create a note note.md that has the following content

Validate that the preview of note.md shows the image.
Go through the steps described in publish wiki https://wiki.dendron.so/notes/e5st4LFLtIwwbQmC6JBaF/
And after running the npx dendron publish export
Grab the files from .next/out/ and utilize python server to serve these files:
python -m SimpleHTTPServer 8000
Expected behavior
Image is shown in the published note.
Actual behavior: The site is being served by python -m SimpleHTTPServer 8000 (look up, searching works). But the images are shown as broken links.
Screenshots
Desktop (please complete the following information)
- OS: [e.g. iOS]
- Browser (if with published websites; include version): [e.g. chrome, safari]
- Versions (all that apply to bug):
- Dendron Extension: 88.0
- VS Code version:
- Dendron CLI:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (16 by maintainers)
@nickolay-kondratyev - I think there’s a simple workaround: prefix all your image links with a slash:
instead of
Can you let me know if this works?
We have some logic in preview to make it work even if there’s no leading slash, but it looks like that logic got dropped in the publishing flow. We’ll follow up on that part.
@jonathanyeung
Here is the entire test repository with, log notes, environment recorded, and entire
.next/outfolder as well to record as much state as possible. Let me know if you are able to reproduce it from running from thishttps://drive.google.com/file/d/1qUyh66qSsvlQ5nD4PbSRXCYON3kIYy5g/view?usp=sharing
Run this command to unpack the folder
And place it into
/tmp/ForPublishTest/for the other command specified in [[command-used-for-publishing]] to work.Or you can also go straight to
.next/outfrom unpacked file an run@jonathanyeung are you trying the basic example from
root.mdnote?It appears that for me if I add an image to
root.mdthe image is rendered but if I add the image to a note right next to root for examplehi.mdthen the same image does not render anymore.Due to 404 such as
Where
9y0v9nlt6xs55ek4pb3klfeis the id of thehi.mdnote.If some other simple server method works better than
python SimpleHTTPServer(node etc…), would be happy to use it.Also could be good to add this method to the wiki as one of the ways to serve the published content (as this seems like the simplest way to publish, when working on internal networks).