Codex Desktop Markdown file preview fails to render local images when paths contain spaces

Open 💬 1 comment Opened May 8, 2026 by RintaroMasaoka

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:

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

or with an absolute path containing a space:

``md
![example](/Users/me/Desktop/My Project/assets/example.png)
``

  1. Open/render the .md file in the right-side preview pane.
  2. 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗