puhhh104 downloadsFork of oz-clear-unused-images for clearing unused images from vaults.
Clear Unused Images Plus is a fork of oz-clear-unused-images.
The current fork is maintained by Aleksei B. The original plugin author is Ozan.
See the CHANGELOG for release-by-release updates.
This plugin helps keep your vault clean by deleting images that are no longer referenced in your markdown notes.
The plugin collects image links from markdown documents and compares them against image files in your vault.
If any image files are not referenced in any document, they can be deleted automatically.
Please make sure that you select the destination for deleted images under the "Clear Unused Images Plus Settings" tab. You have 3 options:

Move to Obsidian Trash - Files are going to be moved to the .trash under the Obsidian Vault.
Move to System Trash - Files are going to be moved to the Operating System trash.
Permanently Delete - Files are destroyed permanently. You will not be able to revert them.
You can enable automatic cleanup during vault startup with the Clean Images On Vault Load setting.

Clear Unused Attachments command.Permanently Delete is selected, the existing confirmation dialog still appears before deletion starts.
You can also enable recurring automatic cleanup with the Clean Images Every X Minutes setting.
Permanently Delete is selected.You can exclude folders from which you do not want images to be removed during the scan. If there are multiple folders to exclude, separate them with commas. Please provide the full path inside the vault:

You can now exclude all subfolders under the folder paths provided above:

Activate the plugin from Community Plugins.
You can either:
![]()
Ctrl/Cmd + P and run Clear Unused Images Plus. 
If you have turned on the "Delete Logs" option in plugin settings, you will see a modal with information about which images were deleted from your vault:

If all images are used, you will see the following message:

Scanned Image Formats : jpg, jpeg, png, gif, svg, bmp, webp
This repository is distributed under the MIT License.