ozntel / oz-clear-unused-images-obsidian

Obsidian plugin to clear the images that are not used in note files anymore
194 stars 16 forks source link

Deletes non-image files, can't configure Attachments folder #16

Open jcezarms opened 2 years ago

jcezarms commented 2 years ago

Scenario

Under the assumption this plugin only deletes images, one could remove important, external assets, like done below: image My specific usecase involves dynamic plotting within notes, which then requires me to have d3.js in the vault's root for the Plotly plugin. This file is also outside the configured Attachments folder, which I naively assumed would be the only target of this plugin, and which is not currently configurable to become the only target¹.

¹ Obsidian attachments folders are always inside the Vault, so the "Exclude Full Paths" option is not applicable for trying to ignore anything outside said folder. Excluding path/to/vault also excludes path/to/vault/attachments. The "Exclude subfolders" is similarly not applicable, since it's the parents of Attachments that need to be ignored.

Possible Solutions