[PR #6678] feat(app): add image preview support in session viewer #12043

Closed
opened 2026-02-16 18:16:58 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6678

State: closed
Merged: Yes


Summary

  • Add image preview support for base64-encoded images in the session viewer
  • Detect images by checking for base64 encoding and image/* mimeType
  • Render images inline with an <img> element instead of showing raw base64 data

Changes

  • Added isImage memo to detect base64 image content
  • Added imageDataUrl memo to construct data URL for rendering
  • Added new <Match> case to render images when detected

Before:
image

After:
image

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6678 **State:** closed **Merged:** Yes --- ## Summary - Add image preview support for base64-encoded images in the session viewer - Detect images by checking for `base64` encoding and `image/*` mimeType - Render images inline with an `<img>` element instead of showing raw base64 data ## Changes - Added `isImage` memo to detect base64 image content - Added `imageDataUrl` memo to construct data URL for rendering - Added new `<Match>` case to render images when detected Before: <img width="2727" height="1986" alt="image" src="https://github.com/user-attachments/assets/9dbd2541-17ab-4284-9d71-caf6d3f93fdd" /> After: <img width="2781" height="1986" alt="image" src="https://github.com/user-attachments/assets/79ebbc61-dd5d-4509-8750-a4d7fffcd692" />
yindo added the pull-request label 2026-02-16 18:16:58 -05:00
yindo closed this issue 2026-02-16 18:16:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12043