Forrest144 downloadsRender image previews below image links in Source mode.
So you're using Obsidian in Live Preview mode. You move your cursor over a formatted word and boom, the hidden markdown syntax pops out and shoves your text halfway across the screen. This constant jumping is a total flow-killer. I call it Editor ADHD.
Markdown was originally built for the content and the syntax to live together. Why not just go back to Source Mode? In Source Mode, what you see is exactly what you typed. Asterisks stay asterisks. Nothing disappears, nothing jumps out, and nothing breaks your focus. That's how writing is supposed to feel.
But Source Mode has one big catch: you can't see your images. Trying to write without visuals is like driving a car without a rearview mirror. That's where the Source Mode Image Renderer plugin comes in. It does one simple thing: you type the image link, and the image renders right there below it.
Render image previews directly below image links in Obsidian Source mode.
![[image.png]] links in Source mode.![[image.png|300]].Search for "Source Mode Image Renderer" in Obsidian's Community Plugins browser.
main.js, manifest.json, and styles.css from the latest release..obsidian/plugins/source-mode-inline-images/ folder.Add an image embed in Source mode:
![[example.png]]
![[example.png|300]]
| Syntax | Result |
|---|---|
![[image.png]] |
Displays image with default max width (480px) |
![[image.png|300]] |
Displays image with 300px width |
300x200 are not supported yet.This plugin does not collect telemetry, does not use network requests, and does not access files outside your Obsidian vault.
npm install
npm run dev
npm run build
MIT
你用 Obsidian,你用实时预览模式,你光标往带标记的字上一放,那些隐藏的标记,Biu,弹出来了,把你后面的字挤得老远。光标一挪走,文本又缩回去了。就这来回哆嗦,你刚想好的那句文案,思路直接断在那儿。我管这叫编辑器多动症。
Markdown 这个东西,它本来就是为内容和标记共存而设计的。所见即所得,是后来硬加的,是花架子。我直接回到源码模式不就完了?源码模式里,敲的是什么就是什么,星号就是星号,不会消失,不会弹出来,不会挤你的字,不会打断你的思路。这才是写东西该有的样子。
但是源码模式有一个问题,你看不到图。写东西看不到图,这就跟开车没有后视镜一样,能开,但别扭。这个问题不解决,源码模式就不是完整的写作环境。所以 Source Mode Image Renderer 诞生了。干的事很简单,你输入图片连接,图片直接在下面渲染出来。
在 Obsidian 源码模式下,自动在图片链接下方实时渲染预览图片。
![[图片名.png]] 语法下方直接显示图片![[图片名.png|300]] 指定图片显示宽度(单位:px)即将上线。
main.js、manifest.json、styles.css.obsidian/plugins/ 目录source-mode-inline-images,将上述三个文件放入其中git clone https://github.com/hiforrest/source-mode-inline-images.git
cd source-mode-inline-images
npm install
npm run build
将生成的 main.js、manifest.json、styles.css 复制到插件目录即可。
切换到源码模式后,正常书写图片链接语法,图片会自动显示在链接下方。
![[screenshot.png]]
![[assets/photo.jpg|400]]
| 语法 | 效果 |
|---|---|
![[图片.png]] |
以默认宽度(最大 480px)显示图片 |
![[图片.png|300]] |
以 300px 宽度显示图片 |
注意:此插件仅在源码模式下生效。Live Preview 和阅读模式由 Obsidian 原生处理,不受影响。
300x200 等尺寸组合语法此插件不收集遥测数据,不使用网络请求,不访问 Obsidian 库以外的文件。
npm install
npm run dev
npm run build
MIT