hitctc40 downloadsClick note images to open a powerful popup preview with zoom, transform, gallery, and mobile gestures.
一个面向 Obsidian 的图片浮窗预览插件:点击笔记中的图片即可打开预览窗口,支持缩放、拖拽、切图与 Pin 多图并行查看。
Pin mode max images:最多保留 1~6 张。Replace oldest image when full:达到上限后自动替换最早打开的预览。img)。fit 与 1:1 之间切换。工具栏内置以下动作:
-+1:1FitCopy◀▶CloseEsc:关闭当前激活预览。插件注册了以下命令:
| 命令 ID | 默认名称(中文) | 说明 |
|---|---|---|
open-preview-at-active-image |
在当前图片打开预览 | 在当前活动视图中打开预览 |
toggle-preview-mode |
切换预览模式 | 普通模式 / Pin 模式切换 |
close-active-preview |
关闭当前预览 | 关闭当前激活预览 |
next-image |
下一张图片 | 切换到下一张 |
prev-image |
上一张图片 | 切换到上一张 |
| 分类 | 设置项 | 说明 |
|---|---|---|
| 基础 | Interface language |
界面语言:跟随系统 / 中文 / 英文 |
| 基础 | Preview mode |
默认预览模式:Normal / Pin |
| 触发 | Trigger scope |
触发范围:仅 Markdown / Markdown+常见面板 / 全局图片 |
| 触发 | Enable linked images |
是否支持点击链接包裹的图片触发 |
| Pin | Pin mode max images |
Pin 模式最多保留图片数(1~6) |
| Pin | Replace oldest image when full |
达到上限后是否替换最旧预览 |
| 视觉 | Enable gallery navbar |
是否显示底部缩略图画廊 |
| 键盘 | Keyboard move speed |
方向键移动速度 |
| 键盘 | Move image modifier |
移动图片时所需修饰键 |
| 键盘 | Switch image modifier |
切图时所需修饰键 |
| 移动端 | Enable mobile gestures |
是否启用移动端手势交互 |
mkdir -p <your-vault>/.obsidian/plugins/images-preview
manifest.jsonmain.jsstyles.css设置 -> 第三方插件 -> 已安装插件# 开发监听构建
npm run dev
# 生产构建
npm run build
# 类型检查
npm run typecheck
# 单元测试(一次性)
npm run test:run
# 单元测试(交互模式)
npm run test
内部开发与多设备无软链接部署流程请见:docs/DEVELOPMENT.md。
src/
main.ts # 插件入口
controllers/preview-controller.ts # 预览编排层
core/ # 纯逻辑(变换引擎、状态机)
input/input-adapter.ts # 鼠标/触摸输入适配
services/ # 画廊收集、设置存储、剪贴板
ui/overlay-host.ts # 预览 DOM 渲染/销毁
settings.ts # 设置页
i18n.ts # 中英文本地化
styles.css # UI 样式
tests/ # Vitest 单元测试
>= 1.8.7manifest.json 中 isDesktopOnly: false)优先检查:
Trigger scope 范围内。Enable linked images 已关闭。切图/移动依赖你设置的修饰键组合。请在设置中确认:
Switch image modifierMove image modifierMIT