Skip to content

[Bug] Inbox: local images inside Markdown attachments still return 404 (follow-up to #1819) #2228

Closed

Description

@zane668

What happened?

A valid relative PNG inside an attached Markdown file does not load in the Inbox attachment preview. The same file and image load in standalone Annotate.

This is the attachment path explicitly left outside #1819, not a claim that its message-body image fix regressed. That PR says: “Images inside an attached markdown file are not served. Only message bodies are covered.”

Reproduction

In an empty directory, run this Python fixture generator (all content is synthetic):

from pathlib import Path
import base64

Path('assets').mkdir(exist_ok=True)
Path('assets/sample.png').write_bytes(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAIAAAAt/+nTAAAATklEQVR4nO3PUQkAIBTAwBfHYMY2jCH8OITBAtxm7fN1wwUNaEEDWtCAFjSgBQ1oQQNa0IAWNKAFDWhBA1rQgBY0oAUNaEEDWtCAFjx2AWvKQKaxk0G4AAAAAElFTkSuQmCC'))
Path('guide.md').write_text(
    '# Attachment preview repro\n\n'
    '[Jump to target](#target-section)\n\n'
    '[Open linked document](peer.md)\n\n'
    '![Sample image](assets/sample.png)\n\n'
    + ''.join(f'Public filler paragraph {i+1}. This is sample text to put the destination below the fold.\n\n' for i in range(65))
    + '## Target section\n\nTarget marker.\n'
)
Path('peer.md').write_text('# Linked document\n\nPublic sample destination.\n')
  1. Start plannotator inbox --no-open.

  2. Use the Inbox MCP send_message tool with project_path set to this directory and attachments containing the absolute path to guide.md.

  3. Open that thread and click the guide.md attachment.

  4. Inspect the sample image and its network request.

  5. For comparison, run plannotator annotate guide.md on the same fixture (dismiss first-run announcements if shown).

Actual vs expected

Surface Image request Decoded dimensions
Standalone Annotate /api/image → 200; includes a base parameter 64×32
Inbox Markdown attachment /api/image?path=assets%2Fsample.png → 404; no base parameter 0×0

Expected: the valid local image renders in the supported Markdown attachment preview, with resolution restricted to the appropriate attachment/project context. This is not a request to expose arbitrary filesystem paths or allow unrestricted remote images.

Environment

  • Plannotator: official 0.28.32, Darwin ARM64 binary.
  • OS: macOS 27.0.1, Apple silicon.
  • Browser: fresh Chromium 155.0.8059.12, headless, 1400×900 viewport.
  • Agent: standalone CLI/MCP reproduction; original workflow uses Pi.
  • Surface: Inbox web UI → Markdown attachment preview.
  • Isolated temporary HOME/data directory; no existing browser profile or private document needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions