oz-clear-unused-images-obsidian icon indicating copy to clipboard operation
oz-clear-unused-images-obsidian copied to clipboard

[BUG] Deleted images by mistake

Open T4erg opened this issue 2 years ago • 5 comments

It has deleted images that had been used in a file。

File path: vault/中文/article.md

Image formation in the file: ![[assets/image-20220831182103.png]]

Image path: vault/中文/assets

Clear Unused Images - Logs:

[+] 07/09/2022, 14:23:10: Clearing started.
[+] Moved to System Trash: 中文/assets/image-20220831182103.png
[+]1 image (s) in total deleted.
[+1 07/09/2022, 14:23:10: Clearing completed.

T4erg avatar Sep 07 '22 06:09 T4erg

The deleted image is the second image in the file. And the first image which has the name with same formation did not been deleted.

Can logs show more information to explain why those images has been recognized 'unused'?

thx a lot.

T4erg avatar Sep 07 '22 06:09 T4erg

I encountered the same problem.

user30535 avatar Sep 07 '22 20:09 user30535

Since the plugin mistakenly deletes used images, I really want to know how to undo the deletion.

user30535 avatar Sep 07 '22 20:09 user30535

The deleted image is the second image in the file. And the first image which has the name with same formation did not been deleted.

@T4erg Can you provide both exact links? It is hard for me to say why it might be caused. My first guess is the non-Latin characters but I need to have some comparisons to test. Thanks

Since the plugin mistakenly deletes used images, I really want to know how to undo the deletion.

@user30535 You can change plugin settings and send all deleted files to either Obsidian Trash or System Trash, which you are using. You can then easily put them back.

ozntel avatar Feb 07 '23 21:02 ozntel

I got the issue like this one sometimes. Here is one possible bug: Whatever image in the in the file I uploaded would be deleted in Obsidian by the plugin. test.md Besides the wiki link would not occur this issue.

The whole text is below as well:

test

test
test:test ![](picture_link_here_would_be_delete)
test

HuoHua2019 avatar Mar 23 '24 07:03 HuoHua2019