README file from
GithubStrip 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]]andembeds, including network URLs like. - 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 a1,2, ... suffix. - A confirm modal shows embed count + file count before anything happens.
- References are detected across
.mdfiles only.
Install
From community plugins (TODO: submit)
Search "Strip Images" in Obsidian's community plugin browser.
Manual
- Copy
main.js,manifest.json,styles.cssinto<vault>/.obsidian/plugins/strip-images/. - 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