galaxyproject / galaxyproject/loom

Orbit: markdown Preview doesn't render relative local images (broken image in File pane)

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
14
Forks
12
Avg merge
6d 5h
Merged PRs (30d)
17

Description

The File pane's markdown Preview doesn't resolve relative image references that sit next to the markdown file. Embedded images render as broken-image/alt text even though the asset is readable -- opening it directly in Orbit renders fine.

**Repro**
1. Create a markdown file containing a relative image reference, e.g. `![plot](plot.svg)`.
2. Put `plot.svg` in the same directory as the markdown file.
3. Open the markdown file from the file sidebar and switch the File pane to Preview.
4. As a control, open `plot.svg` directly from the sidebar -- it renders correctly.

**Expected:** Preview renders the local image from the markdown file's directory.
**Actual:** Preview shows only the broken-image/alt text; the SVG opens fine on its own.

**Why it matters:** generated reports and notebooks routinely embed local plots via relative paths, so valid reports look broken in Preview. Likely the preview renderer needs to resolve relative `src`/`href` against the markdown file's directory (e.g. a `` or rewriting to `file://`). Related to but distinct from #188 (SVG opened directly), which is fixed.

Reported via Orbit 0.4.1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the File pane's markdown Preview renderer and reproduce the issue using a markdown file containing ![plot](plot.svg) beside plot.svg. Trace how relative image src or href paths are resolved; done means local images render in Preview from the markdown file's directory while direct SVG opening continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.