Skip to content

Feature: Support rendering base64 inline images in doc viewer #75

@linda-agi

Description

@linda-agi

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.

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