knowns icon indicating copy to clipboard operation
knowns copied to clipboard

Feature: Support rendering base64 inline images in doc viewer

Open linda-agi opened this issue 8 months ago • 0 comments

Summary

When embedding images as base64 data URIs in a knowns doc, the image is not rendered in the doc viewer. The broken image icon is shown instead.

Steps to Reproduce

  1. Create or edit a knowns doc with the following markdown:
    ![Screenshot](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...)
    
  2. View the doc in the knowns viewer

Expected Behavior

The image renders inline, similar to how GitHub, VS Code, or Obsidian handle base64 data URIs in markdown.

Actual Behavior

The image does not render — a broken image icon is displayed instead.

Context

This came up while writing a design spec doc where we wanted to embed UI mockup screenshots directly into the doc without hosting them externally. Base64 embedding is a common pattern for portable, self-contained docs.

Environment

  • knowns version: 0.12.4

Suggested Fix

Allow data:image/...;base64,... URIs in the markdown image renderer, alongside regular http:// and relative paths.

linda-agi avatar Mar 18 '26 04:03 linda-agi