Strip Images

by dwSun
5
4
3
2
1
Score: 50/100

Description

Reviews

No reviews yet.

Stats

0
stars
14
downloads
0
forks
5
days
5
days
5
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
2
commits

Latest Version

6 days ago

Changelog

1.0.1

修复 Obsidian 社区插件审核提出的问题:

  • License:添加 MIT LICENSE 文件(仓库此前声明 MIT 但缺少 LICENSE 文件)
  • Source code:移除第三方依赖 builtin-modules,改用 Node 内置 module.builtinModulesesbuild.config.mjs

升级说明

功能无变化,仅满足社区插件审核要求,可直接覆盖更新。

README file from

Github

Strip Images

Right-click a Markdown note → 移除图片 to strip every image embed from that note. Image files that are referenced only by that note are moved to .trash/ (folder structure preserved); images shared with other notes keep their files and only the embed is removed.

Behavior

  • Detects both ![[wiki]] and ![](https://raw.githubusercontent.com/dwsun/obs-StripImages/HEAD/markdown) embeds, including network URLs like ![](https://example.com/x.png).
  • Network / unresolvable embeds: the embed text is removed, no file touched.
  • Shared images (referenced by ≥ 2 notes): only the embed is removed.
  • Solo images (referenced only by the current note): file moved to .trash/<original-folder>/<name>. Collisions get a 1, 2, ... suffix.
  • A confirm modal shows embed count + file count before anything happens.
  • References are detected across .md files only.

Install

From community plugins (TODO: submit)

Search "Strip Images" in Obsidian's community plugin browser.

Manual

  1. Copy main.js, manifest.json, styles.css into <vault>/.obsidian/plugins/strip-images/.
  2. Settings → Community plugins → enable Strip Images.

Develop

npm install
npm run dev    # watch build
npm run build  # production build
npm run deploy # build + copy into the test vault configured in package.json

Built with esbuild. Target Node ≥ 18.

License

MIT