codex - 💡(How to fix) Fix Codex Desktop Markdown file preview fails to render local images when paths contain spaces

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

This may share root cause with local-resource URL/path encoding in the Desktop app Markdown renderer. A useful control would be comparing the same image copied to a path with no spaces against the original path with spaces.

Code Example

![example](./assets/my image.png)

---

![example](/Users/me/Desktop/My Project/assets/example.png)
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

Not sure. Codex Desktop app on macOS. I could not retrieve the app version from this environment.

What platform is your computer?

macOS 26.3.1, arm64.

What issue are you seeing?

In the Codex Desktop right-side Markdown file preview pane, local image embeds fail to render when the referenced image path contains spaces. The preview leaves a blank / missing image area instead of loading the local image.

This report is specifically about rendering images inside a .md file opened in the right-side preview pane, not about clicking a file link in an assistant message.

Steps to reproduce

  1. In a Codex Desktop workspace on macOS, create a Markdown file and an image file under a path containing a space.

  2. Reference the image from the Markdown file, for example:

    ![example](./assets/my image.png)

    or with an absolute path containing a space:

    ![example](/Users/me/Desktop/My Project/assets/example.png)
  3. Open/render the .md file in the right-side preview pane.

  4. Observe that the image does not render correctly.

Expected behavior

Markdown image embeds should render correctly when the local path contains spaces, either by preserving the full path as a single local-resource path or by correctly encoding spaces as %20 before resolving the image source.

Actual behavior

The image area is blank / missing in the right-side Markdown file preview when the image path includes spaces.

Related issues checked

I found several related local path / Markdown rendering issues, but none that appear to be the exact same scope:

  • #14641: Markdown file links with spaces in absolute paths render as plain text. Related path encoding issue, but this report is about image embeds in Markdown file preview.
  • #17682: macOS clickable local file paths with spaces do not open / preview. Related local path handling, but this report is about rendering images inside a .md preview.
  • #20166: macOS local Markdown images fail when paths contain non-ASCII characters. Likely same path/URL encoding area, but this report is specifically paths containing spaces.
  • #14576: Windows desktop app does not render local Markdown images from absolute drive-letter paths. Related image rendering issue on Windows; this report is macOS/right-pane Markdown file preview with spaces.

Additional information

This may share root cause with local-resource URL/path encoding in the Desktop app Markdown renderer. A useful control would be comparing the same image copied to a path with no spaces against the original path with spaces.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Markdown image embeds should render correctly when the local path contains spaces, either by preserving the full path as a single local-resource path or by correctly encoding spaces as %20 before resolving the image source.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop Markdown file preview fails to render local images when paths contain spaces