HRIS Manager and Passionate Programmer building Websites, Plugins and Various Automatization Scripts.
You can visit 🏠 My Personal Page if you want to find out more.
Obsidian plugin to clear the images that are not used in note files anymore
You can visit 🏠 My Personal Page if you want to find out more.
I need to clear unused pics and VsCode is more frefuently used in my case. Do you have a version for that? Thanks
Hello! Great plug-in! It helps me to clean around 100 images (yup... Copy paste 🙈)
I was wondering if it's possible to add an option to :
Thank you anyway! ✨
Excuse me, when I delete the unused image to ob trash, how can I recovery the deleted image to the origin position? I can't find the original location of the deleted image.
This plugin deletes images that are linked.
I was able to restore them from version control, so I'm OK... but still...
Here are some existing links to images:
%% Zoottelkeeper: Beginning of the autogenerated index file list %%
📄 [[Clare/Humour and interesting things/IMG_0439 - Quantum Engagement - Jim Al-Khalili.PNG|IMG_0439 - Quantum Engagement - Jim Al-Khalili.PNG]]
📄 [[Clare/Humour and interesting things/IMG_0441 - Traditionalist Cartoon.JPG|IMG_0441 - Traditionalist Cartoon.JPG]]
📄 [[Clare/Humour and interesting things/IMG_0591 - Sufficiently Advanced Stupidity.PNG|IMG_0591 - Sufficiently Advanced Stupidity.PNG]]
📄 [[Clare/Humour and interesting things/IMG_0625 - REDACTED.PNG|IMG_0625 - REDACTED.PNG]]
📄 [[Clare/Humour and interesting things/IMG_2030 - Blame the Straight People.JPG|IMG_2030 - Blame the Straight People.JPG]]
%% Zoottelkeeper: End of the autogenerated index file list %%
# Amusing Images
![[IMG_0439 - Quantum Engagement - Jim Al-Khalili.PNG]]
![[IMG_0441 - Traditionalist Cartoon.JPG]]
![[IMG_0591 - Sufficiently Advanced Stupidity.PNG]]
![[IMG_0625 - REDACTED.PNG]]
![[IMG_2030 - Blame the Straight People.JPG]]
When I run "Clear unused images" I get this output, showing me that all those linked images were deleted:
I really like your plugin, it is very useful, but I have recently started using the Banners plugin (https://github.com/noatpad/obsidian-banners), which adds a local image in the FrontMatter.
When I run your plugin, it does not detect that image belongs to that note and eliminates it.
Is an option possible so that this does not happen?
Thanks
is it the plugin desktop only?
I frequently use (admonition) codeblocks to manage images. For example image grids to more efficiently arrange images or in admonition codeblocks for warnings or quotes.
Also "Obisdian Columns" uses codeblocks to display multiple columns.
These images DO get deleted when running the "clear unused images" command.
Luckily I had a backup to restore all the lost images.
Since codeblocks are used very frequently to add additional functionality to Obisdian (like Grids, Columns and so on), this is (obviously) a major breaking issue.
STEPS TO REPRODUCE:
EXPECTED RESULT
ACTUAL RESULT
EXAMPLE
```ad-warning
![[test_image.png]]
```
I'd rather not delete unused images, because I meant to add them to pages. I would like to move them to another folder to look at each one.
删除的日志,Delete Logs可以保存到本地吗?
Hi,
I have a folder with images that I want to exclude from being deleted if not used.
In this folder I have 2 images used for banner, and one of them is not used
KnowledgeBase is the name of my Obsidian Vault
Folder is under C:/path/KnowledgeBase/banner
Under "Clear Unused Images" plugin I've set a "Excluded Folder Full Paths" to: KnowledgeBase/banner
When I hit "clear Unused images", the used image is not deleted, but the unused file is deleted.
Did I miss something in the configuration of the plugin? or is it a bug?
Obsidian Version: 0.12.16 / Clear Unused Images plugin version 1.0.3
Thanks for the support
Hello! Thank you for the great extension! Here I have an idea, it would be better to add a command to delete only the unused images of the currently opened file, so that the user experience will be more friendly and user-friendly.
And allow the user to manually trigger the command to delete the file instead of forcing it to be deleted automatically.
iyi bayramlar...great work on this plugin @ozntel !
I am wondering, where do the deleted images go - do they get immediately destroyed, or end up in Vault trash etc?
A new option for dealing with the unused images:
This is probably a nice feature for someone new to the code base to implement, if they know TypeScript. I don't know TypeScript. 😢
My use case:
I've migrated my vault from Joplin, and I'm paranoid about having lost notes, broken image references, etc. I'd like to see what images I've got that haven't been properly referenced by a note.
Implementation ideas:
_Unused Images.md
in the vault root. Append to existing file? or offer to overwrite?# Unused Images
![image_name1.png](path/to/image_name1.png)
![image_name2.png](path/to/image_name2.png)
...
![image_namen.png](path/to/image_namen.png)
I put all the images I insert into Notes in a subfolder called "ASSETS". This folder exists in every directory. Furthermore, there are many images that stand completely alone, for example because they belong to the project and stand alone.
It would help me a lot if your plugin would check only all those images that are in the folders with special names (for me "ASSETS").
redundant webp images cannot be cleaned, wish to support, thanks!
Hello, I some times like to use Annotator to annotate my pdf file. However, oz-clear-unused-images-obsidian didn't recognize the file name in annotate. Then it delete the pdf file there. This is not the result I wang to have. Can you add the support to recognize the file in annotate?
It would be really useful if the plugin could delete unused attachments that are not images, e.g. PDFs, Word Files, etc.
Hello, I have downloaded and saved many webp image files from the internet in md file. However, it appears that the plugin is unable to recognize this file format. I am hoping that support for webp images can be added. Thank you.
can this plugin support to exclude files by specific name?
as Im using Make.md plugin that creates sqlite files like "context.mdb" in every folder.
I need those file to have like board view of my folder files, but this plugin will delete them.
can you support to exclude file by specific name? or even better, support regex like "*.mdb"
Under the assumption this plugin only deletes images, one could remove important, external assets, like done below:
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.
Hello!
I found a little problem : I have a gallery of images references for writing, and the plugin delete it because the plugin gallery doesn't work as link.
It will be good to exclude folder.
I love this add-on, but I accidentally deleted about 100 PDFs I placed in my attachment folder. To prevent this, would you please add a delete confirmation dialog listing all the files to be deleted? Thanks in advance.
That shows what would be deleted without doing the delete.
I had a typo entering the exclude folder path. When running "clear unused attachments", a whole folder tree (mix of files and subfolders) was deleted. "Move to Obsidian trash" discards the folder structure.
An option to copy the log to the clipboard would also be handy.
请问删除的文件有办法恢复吗?
请问删除的文件有办法恢复吗?
请问删除的文件有办法恢复吗?
Hi there, I think it's really inconvenient to add a folder to the exclude list every time I create one.
I suggest to add for example:
Path* = Excludes every subfolder and sub-subfolder inside the Path
I also think that it's a good idea to only scan a certain folder when deleting, since some people (me) only put images/attachments inside a folder, and permanent/important images inside another
I hope that makes sense lol
thank you!
I found that having a Path like Something+/Files
needs to be added as Something\+/Files
to avoid deletion of the images.
P.S.: I actually think that the plugin needs to be changed so that it presents what it wants to delete and to add exceptions there. But from looking at the open issues, I guess the author does not really want to invest this time.
@ozntel I just want to ask if you are continuing to develop and/or will accept PRs for this repo?
When I use the command, Clear Unused Images, to delete image, it always displays the log. However, sometimes it doesn't delete the file and I don't want to see it.
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.
if i paste a picture in admonition, this plugin will Mistakenly deleted the picture embeded in admonition
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.