Releases: israerusan/attachment-audit
Release list
1.2.1
Two fixes found by testing against a real vault rather than by review. If you are on 1.1.0 or 1.2.0, update.
Attachment Audit was suppressing its own detection
Since 1.1.0 the scan reads .obsidian/plugins/*/data.json, because other plugins legitimately reference vault images there — that closed a real hole where a plugin-referenced image looked unused.
But it also read this plugin's own data file, which records every path it touches: ignored results, excluded paths, and from 1.2.0 the cleanup journal. The reference scan found those filenames, concluded the files were still in use, and stopped reporting them.
Most visible after restoring something from the history — the file came back but never appeared in a scan again. Our own bookkeeping is not evidence about your vault, and is now excluded.
Restored files are visible immediately
Restoring from the trash moved the bytes with a raw filesystem call that bypassed Obsidian's file index, so the file was genuinely on disk while the very next scan could not see it. Files are now written back through the vault, and the original modification time is preserved.
Verified against a real vault
The trash behaviour had never been tested outside code review. It now has:
.trashis flat — folder structure is discarded- trashing preserves file contents, so restores can verify identity by content
- restoring two files both named
photo.pngfrom different folders returns each to its own folder with its own content — the collision case that would otherwise swap your data
Full notes in CHANGELOG.md.
1.2.0
Cleanup history — see everything Attachment Audit changed, and put it back.
Until now, everything backing the claim that this plugin is safe enough to trust with bulk delete was prose: a README section, a confirm dialog, a two-signal safety contract you had to take on faith. This release makes it evidence.
Added
- Cleanup history. Every trash, move and rename is recorded — which files, from where, to where, how big, and when. Open it from the dashboard, the command palette, or settings.
- Restore. Put an action back in one click. Free, at any size — Pro is for doing cleanup at scale; recovering from it is safety, not scale.
- Reversing a move or rename goes back through Obsidian, so every link it updated on the way out is updated again on the way back.
- A partially-completed restore can be finished later — restored files are ticked, and the button offers only what is left.
It identifies the file, or refuses
Restoring from the trash means finding the file again, and .trash holds everything you have ever deleted — so the pool is full of near-misses. Each trashed file records its size and a hash of its content at the moment it was trashed, and a candidate must match before anything is moved. If it cannot be identified with certainty, the restore refuses and says why rather than guessing.
Getting this wrong would write a stranger's content to a path you believe is recovered and consume the real file from the trash, putting it beyond Obsidian's own recovery too.
Honest about what it cannot do
Only files sent to the vault's .trash folder can be restored by a plugin:
| Your "Deleted files" setting | Can Attachment Audit restore it? |
|---|---|
Move to Obsidian trash (.trash) |
Yes, after verifying the content |
| Move to system trash | No — it points you there instead |
| Permanently delete | No, and it says so before you confirm |
Where a trashed file went is recorded at the moment of the action, so changing that setting later can never make the history offer a restore that would not work. Anything the plugin cannot verify fails closed.
Changed
- The trash confirmation now says Attachment Audit itself can put local-trash files back, rather than only that they are recoverable.
- A "Cleanup history entries" setting controls how much is kept. Setting it to 0 stops recording; it does not discard what is already there.
Full notes in CHANGELOG.md.
1.1.0
A safety, performance and interface release. If you use the unused detector, update.
Fixed — data safety
- Widened the reference corpus. The "is anything mentioning this file?" check only read
md,canvas,base,svg,html,cssandxml. A file referenced from a.txt,.tex,.json,.excalidraw,.opmlor.bibwas invisible to it, so the file could be reported unused and trashed. Around forty text formats are now read. - Obsidian's config folder is scanned too.
vault.getFiles()never returns anything under.obsidian/, so an image referenced only from a CSS snippet, a theme, or another plugin'sdata.jsonlooked unused. - Notes kept in the reports folder are honoured again. Only the timestamped reports this plugin generates are discounted from the safety signals.
- A failed read can no longer cause a false "unused". If any source file cannot be read, the scan declines to flag anything unused.
- More reference encodings recognised: decomposed Unicode, percent-encoded decomposed paths, partially-composed text, and HTML-entity
&. - Empty files are no longer treated as duplicates of each other, and duplicate cleanup now checks survivors against the filesystem rather than the last scan.
- Catastrophic regex patterns are refused. A junk-name or custom rule could freeze Obsidian indefinitely, and did so again on every restart.
- Case-only renames work, move no longer flattens subfolders, reserved Windows names are caught with any extension, corrupt settings can no longer silently disable every detector, and scans stop when the plugin unloads.
Added
- Broken link detection — links pointing at attachments that no longer exist, with the notes to fix.
- Image previews in the results list and review queue.
- Duplicate copies are grouped into one cluster showing the recoverable total.
- Trash and Move in the review queue (
tandm). - Destructive confirmations list the exact files they will touch.
- A scan-failure state, so stale results are never presented as current.
Changed
- More is free. Report export, bulk ignore and bulk mark-reviewed no longer require Pro. The Pro line is now bulk mutation (trash, dedupe, move) plus profiles, custom rules and severity tuning.
- The results row was rebuilt. In a 300px sidebar the filename previously got about five characters; it now gets the full row width.
Performance
- The live safety re-check is incremental — single-file trash used to re-read the entire vault on every click.
- Duplicate hashing is bounded by bytes, not file count.
- The reference matcher is roughly 40% faster.
Full notes in CHANGELOG.md.
1.0.2
Point the purchase link at the dedicated Buy Me a Coffee product (/e/560207) so sales are tracked per plugin. Adds fundingUrl and a real buy link in the README.
1.0.1
Fresh release to rerun Obsidian automated review against the current Attachment Audit identity. Manifest/release assets use id attachment-audit and name Attachment Audit, fundingUrl remains absent, and public Pro surfaces now point to the repo buy-info section instead of implying a live checkout.
1.0.0
Initial release. Find unused, duplicate, oversized, poorly-named, and misplaced attachments; reclaim space with safe trash/dedupe/move (recoverable trash, link-preserving moves). See CHANGELOG.md for details.