Image Embedder
unlistedby Air-0000
Paste images as base64 and fold them in the editor
Image Embedder
Paste, drop, or convert images into inline base64 data URIs — and fold them permanently in the editor.
A combined plugin merging Image Inline and Base64 Image Hider.
Features
- Paste & Drop — images from clipboard or drag-and-drop are automatically converted to
inline Markdown - Locked Fold — each base64 blob is replaced by a compact
…widget that never expands (all mouse/keyboard events blocked) - Cursor Escape — cursor automatically jumps out of the base64 data section
- Batch conversion — convert
![[image.png]]embeds ↔ base64 across note/folder/vault scope - Export — materialize inline base64 images back to vault attachment files
- Resize — optionally resize images before embedding, or save large images as attachments instead
- Settings — toggle all features including the fold behavior
How It Works
Before in editor: 
After: …
The plugin uses a CodeMirror 6 ViewPlugin with Decoration.replace and a WidgetType that:
- Returns
ignoreEvent = true— the widget swallows every click and keypress - Returns
Decoration.replace— removes the text from layout so horizontal scroll isn't stretched - Registers after
onLayoutReady— does not affect Obsidian startup time
Installation
Manual
cd /path/to/your/vault/.obsidian/plugins
git clone https://github.com/Air-0000/obsidian-image-embedder.git
Enable Image Embedder in Settings → Community Plugins.
BRAT
Add Air-0000/obsidian-image-embedder as a beta plugin in BRAT.
Settings
| Setting | Description |
|---|---|
| Convert on paste | Auto-convert pasted images to base64 |
| Convert on drop | Auto-convert dropped images to base64 |
| Auto escape base64 section | Move cursor past the data URI on entry |
| Fold base64 in editor | Replace base64 with locked … widget (restart required) |
Plus image resizing options when enabled.
Compatibility
| Plugin | Status |
|---|---|
| Image Inline | Superseded |
| Excalidraw | No interference with .excalidraw.md files |
Requires Obsidian ≥ 1.4.0 (CodeMirror 6 editor).
License
MIT
中文说明 {#chinese}
功能
将粘贴、拖拽或文档中的图片自动转为 base64 内嵌 Markdown,并在编辑器中永久折叠。
- 粘贴/拖拽自动转换为
 - 锁定折叠 — base64 内容替换为
…组件,不可点击展开 - 光标逃离 — 光标自动跳出 base64 段
- 批量转换/导出 —
![[图片.png]]↔ base64,支持单文件/文件夹/全库范围 - 图片缩放 — 嵌入前自动缩小大图
安装
cd /你的仓库/.obsidian/plugins
git clone https://github.com/Air-0000/obsidian-image-embedder.git
在设置 → 第三方插件中启用 Image Embedder。
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.