You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] MarkText cannot display images on a file share, all images show up as "Load image failed" #4577
When viewing markdown files with local images, it works when you're on a local drive, but not when the markdown is on a file share, such as \\server\share\folder.
Steps to Reproduce
Create a simple markdown file containing nothing but:

Now, in the same folder, create an image called foo.png. Now, view it in MarkText. It works.
Now, copy both to a file share, such as \\server\share\folder
View the markdown file there. You will see it fails to load the image, and instead displays "Load image failed".
This is 100% reproducible, and works when you map a drive letter to the share instead (which isn't an option), but it preventing me from using MarkText, as every single markdown file we use is on file shares, and every one of them has images.
Expected Behavior
If MarkText can read the .md file, it should be able to read relative path image files, too, regardless of where they are.
Actual Behavior
Image displayed when the markdown is on a local drive, and an error when on a file share.
The project tree issue has a separate but related UNC watcher cause. On a real WSL UNC path, chokidar did not enumerate initial files with polling disabled:
Activity
jyte commentedon Jun 27, 2026
Likely same as what is described in #4563 as use case 1.
I have a fix for it that I will propose soon.
Renakoni commentedon Jun 28, 2026
This appears to be a general UNC-path handling issue, not a WSL-only problem.
There are two related failure modes:
file://URLs.add/addDirevents unless polling is enabled.For example, a Windows UNC path such as:
must be represented as a host-based file URL:
The previous path resolution could lose the UNC host portion. In particular, resolving a path like:
could turn it into:
That then becomes:
which points to a local
/wsl.localhost/...path instead of treatingwsl.localhostas the file URL host.The fix is to preserve UNC semantics when resolving image paths and to generate normalized local file URLs:
The project tree issue has a separate but related UNC watcher cause. On a real WSL UNC path, chokidar did not enumerate initial files with polling disabled:
So UNC roots should force
usePolling: truefor the watcher. This covers both WSL UNC paths such as:and ordinary Windows network shares such as:
fix: cherry-pick seven upstream fixes; cure state-clone aliasing