Strip Images

approved

by dwSun

Right-click a note to remove all image embeds; delete image files that are referenced only by that note (moved to .trash). - This plugin has not been manually reviewed by Obsidian staff.

45 downloadsUpdated 1mo agoMIT

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 ![](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

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.