Skip to content

379949990/obsidian-export-img

Repository files navigation

Export Img

Export Img — export Markdown notes as images that approximate Obsidian Reading view.
Themes · Callouts · Code · Math · Mermaid · Embeds · Frontmatter · Author · Watermark

release obsidian pnpm license


What it does

Export Img opens an Export Studio that:

  1. Renders the note with Obsidian’s MarkdownRenderer
  2. Loads remote images through Obsidian requestUrl into a session cache (status shows progress; first preview waits until they are ready)
  3. Fits wide blocks to the export width and optionally clamps media height
  4. Settles images, fonts, and diagrams, then captures with modern-screenshot

Studio preview stays at for speed. Copy / Save use your export scale (default ) with font embedding.


Install

  1. Community plugins → search Export Img (after publish), or
  2. Manual: put main.js, manifest.json, and styles.css from Releases into .obsidian/plugins/export-img/

Requires Obsidian 1.5.7+. Plugin id: export-img.

Contributors and branch model: README.dev.md · HANDOFF.md.

Current development branch: v1.0.5


Usage

Action How
Export note Command / file menu → Export Img
Export selection Command / editor menu (optional quick-copy skips Studio)
Export folder Folder menu → ZIP of images (desktop)
Refresh preview Title-bar refresh control when status is idle / ready

Settings open from Settings → Export Img. Author/watermark fields there are prefill only — enable them with the toggles inside Export Studio. Save writes the studio draft back to plugin settings (Copy does not).


Features

Export Studio

  • Live bitmap preview with pan / zoom
  • Shared controls for width, theme, padding, split, media limits, decorations
  • Settle status (idle / rendering / ready / timed out) plus remote-image loading progress
  • On timeout, Copy/Save stay disabled until you confirm Export anyway
  • Manual refresh rebuilds the capture host and resets preview pan/zoom

Media layout

Setting Behavior
Max media height Caps embeds, Mermaid, and other wide blocks after width fit. 0 / empty = no limit
Media alignment Left or Center, applied only to media that reaches that height cap. Shorter media keeps the note’s own layout

HTML badge rows (several inline <img>s in one paragraph) stay horizontal — only Obsidian embed images use block layout.

Remote images

  • Network http(s) images are fetched once per plugin session and reused from an in-memory blob cache
  • Rejects non-image MIME types and payloads over ~12 MB; failures show a notice
  • Title bar shows loading progress until hydrate finishes, then the first preview is captured
  • Cache is cleared when the plugin unloads

Decorations

  • Author bar — toggle (Studio only), name, bio, alignment, avatar (upload / vault file as data URL / remote URL)
  • Watermark — toggle (Studio only), text or image, opacity and rotation

Long notes

  • Split: off · fixed height · horizontal rules
  • Default fixed page height ≈ width × 1.414 (A4). Blocks are never cut mid-element.

Batch & selection

  • Folder export → ZIP on desktop; on mobile, one shared ZIP (or vault fallback)
  • Selection export; optional quick copy without opening Studio

Desktop & mobile

Desktop is the primary target (Studio, clipboard, ZIP).

On mobile:

  • Save opens the system share sheet so you can choose Save Image / Save to Photos (falls back to download, then vault attachment). Cancelling the share sheet does not persist studio settings.
  • Copy may be unavailable — prefer Save
  • Multi-page / folder exports share one ZIP (not N share sheets)
  • Studio: compact controls, pinch-zoom / double-tap fit; multi-page preview fits width and height
  • Long notes auto-split into pages (even when Split is Off); panel shows a hint when this happens
  • Export scale capped at ; may drop further so each page stays within ~8M canvas pixels
  • Render wait timeout capped at 5s
  • A single oversized block (tall image / code fence) may still allocate a large canvas — shorten the block or lower width/scale if the app crashes

Resolution

Path Scale Fonts Intent
Studio preview No Fast feedback
Copy / Save 1× / 2× / 3× Yes Shareable sharpness

Limits vs Reading view

Exports approximate Reading view; they are not a screenshot of the open pane:

  • Offscreen render host, not the live Reading DOM
  • Wide blocks are fitted to the chosen width
  • “Frontmatter” is a simplified property table, not the Obsidian Properties UI
  • Forced light/dark copies app theme CSS variables onto the export host; community themes that style via body.theme-* descendant selectors (not variables) may still partially follow the shell
  • Math settles when MathJax containers are present; complex equations may still soft-timeout
  • Community themes and plugin widgets may differ
  • Code blocks and tables keep Reading column width (not shrink-to-fit); very long lines may extend the bitmap
  • Preview is 1× without fonts; export uses your scale with fonts
  • Slow assets may soft-timeout (status: Timed out — export blocked until confirmed)

Credits

Inspired by the community Export Image plugin — this project is a full rewrite and enhancement, focused on Reading-view fidelity.

Capture: modern-screenshot.

License

MIT · Egoism (@379949990)

About

Export notes as images that closely match Reading view — callouts, code, math, Mermaid, embeds, and more. Includes Export Studio with live preview, long-note splitting, and batch folder export.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors