lishuai199330 downloadsAuto-arrange consecutive images into side-by-side rows with drag-to-reorder, resize handles, and draggable dividers, similar to Feishu documents.
Automatically arrange consecutive image embeds into side-by-side rows — like Feishu / Lark documents. Drag to reorder, drag the divider to resize, and each row keeps its own layout across sessions.
r90 / fv), so the image file itself is never re-encoded and each change is a single undoable edit. Reset returns the image to its original orientation.![[…]] link instead of minting a duplicate attachment, while pasting into another vault or app yields the image itself — PNG and JPEG files go over byte-for-byte, lossy formats are re-encoded as JPEG. Cut additionally removes that one reference, and deletes the local file only when nothing else in the vault points at it.Search for Drag Image Auto Arrange in Settings → Community plugins → Browse, then install and enable it.
Copy main.js, manifest.json, and styles.css into <your vault>/.obsidian/plugins/drag-image-auto-arrange/, then enable the plugin in Settings → Community plugins.
Write image embeds on consecutive lines to place them in one row:
![[sunset.png]]
![[harbor.png]]
![[market.png]]
The plugin detects the run of image lines, renders them as one row, and writes each member's layout back to the embed parameters as you drag and resize. A row with a single image is sized from the plugin settings until you resize it by hand.
Layout parameters are stored on the embed line itself, so the arrangement survives re-opening the note, syncing, and switching between Live Preview and Reading Mode.
The foot of the plugin's settings tab holds two vault-wide passes. Both scan first and show the exact scope — how many notes were read, how many lines matched, how many files are involved — and only write after you confirm. Notes currently open are written through an editor transaction (a single cmd+z undoes the whole note); the rest go through vault.process. Files that fail are counted and named in log.txt.
|width and |widthxheight. Run this before uninstalling; after clearing, disable the plugin immediately.|400 / |400x300 on a single-image row is kept as a manual width (|1|400).Both passes are irreversible on notes already saved to disk. While the plugin is enabled, opening or editing a note writes its parameters back on the first frame — so to uninstall, close the open notes first, run Clear DIAA format, then disable the plugin immediately.
npm install
npm run dev # watch build
npm run build # type-check + production bundle
npm test # unit tests
Releases are built and published by the workflow in .github/workflows/release.yml, which runs on any pushed tag and attaches main.js, manifest.json, and styles.css to the created Release.
MIT — see LICENSE.
自动把连续的图片嵌入排列成并排的多图行,效果类似飞书 / Lark 文档。可拖拽排序、拖拽分隔条调整宽度,每行都会各自记住布局。
r90 / fv),原图文件自始至终不被重编码,每次操作都是一步可撤销的编辑;重置后回到原始朝向。![[…]] 链接,而不是另存出一份重复附件;粘到其它仓库或 App 则落成图像本身 —— png / jpg 原样写入,webp、avif 等有损格式转码为 JPEG。剪切还会移除该处引用,并且仅当全库再无其他引用时才删除本地文件。在 设置 → 第三方插件 → 浏览 中搜索 Drag Image Auto Arrange,然后安装并启用。
把 main.js、manifest.json、styles.css 复制到 <你的库>/.obsidian/plugins/drag-image-auto-arrange/,然后在 设置 → 第三方插件 中启用。
把图片嵌入写在连续的行上,它们就会进入同一行:
![[sunset.png]]
![[harbor.png]]
![[market.png]]
插件会识别这一串连续的图片行,将其渲染为一行;在你拖拽与缩放的同时,把每个成员的布局写回该嵌入行的参数中。只有一张图的单图行在手动缩放之前,会按插件设置决定尺寸。
布局参数保存在嵌入行本身,因此重新打开笔记、同步、以及在实时预览与阅读模式之间切换后,排版都能保持。
插件设置页底部有两个全库动作。两者都是先扫描、把改动范围显示给你(读过多少笔记、命中多少行、涉及多少文件),确认之后才写入。正在编辑器里打开的笔记走编辑器事务(该笔记一次 cmd+z 可整体撤销),其余文件走 vault.process;写失败的文件会计数并在 log.txt 中留痕。
|宽度、|宽x高 保留。卸载前先执行本动作,清除完成后立即停用插件。|400 / |400x300 会保留为手动宽度(|1|400)。两个动作对已保存到磁盘的笔记都不可撤销。插件启用期间,笔记只要被打开或编辑,参数就会在第一帧被重新写回 —— 若要卸载,请先关闭所有打开的笔记,执行「清除 DIAA 格式」,然后立即停用插件。
npm install
npm run dev # 监听式构建
npm run build # 类型检查 + 生产构建
npm test # 单元测试
发布由 .github/workflows/release.yml 中的工作流完成:推送任意 Tag 即触发构建,并把 main.js、manifest.json、styles.css 作为附件上传到新建的 Release。
MIT,详见 LICENSE。