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

Plugin deletes the images which are used in Canvas View #24

Closed caglarongan closed 1 year ago

caglarongan commented 1 year ago

As title says, plugin is not aware of the images in new released Canvas view, so it deletes them.

Screen Shot 2022-12-06 at 13 03 11 PM

Çok faydalı bi plugin, kolaylıklar :)

Broadchurch95 commented 1 year ago

Have the same problem.

o98k-ok commented 1 year ago

Yes, I got the same problem, I set Excluded Folder Path to avoid it.

image
morgancheung commented 1 year ago

+1 same problem

ghostzhang commented 1 year ago

不仅仅是图片,如果执行清除附件,还会把canvas文件也清除了

bfloydd commented 1 year ago

+1

i-iooi-i commented 1 year ago

是的,今天我也遇到了相同的问题~

wednes78 commented 1 year ago

i have the same problem.

ku-zhen commented 1 year ago

the same

Oskiator commented 1 year ago

Same problem. In addition, it would be great to have the ability to undo the action in case of this kind of problem 😉 🙏

ozntel commented 1 year ago

I just released a new version that includes attachments that are used in Canvas files for cross-checking. In addition, the plugin now accepts .canvas files as note files and not attachments. Please let me know in case the issue persists. Thanks

HynDuf commented 1 year ago

The problem still occurs to me (canvas's card) (I have just installed the plugin an hour ago)

ku-zhen commented 1 year ago

it works well for image in canvas,but for image in canvas's card , it does‘t work

ozntel commented 1 year ago

it works well for image in canvas,but for image in canvas's card , it does‘t work

Can you give an example how you use? Honestly speaking I havent used Canvas, yet

HynDuf commented 1 year ago

it works well for image in canvas,but for image in canvas's card , it does‘t work

Can you give an example how you use? Honestly speaking I havent used Canvas, yet

image

You add a card and then paste the images in the card.

antomonte commented 1 year ago

Does it also work for images called within excalidraw notes?

Regards

El dom., 5 feb. 2023 23:53, Ozan Tellioglu @.***> escribió:

I just released a new version that includes attachments that are used in Canvas files for cross-checking. In addition, the plugin now accepts .canvas files as note files and not attachments. Please let me know in case the issue persists. Thanks

— Reply to this email directly, view it on GitHub https://github.com/ozntel/oz-clear-unused-images-obsidian/issues/24#issuecomment-1418287386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABOFVZRBTOU3QW5FMIEDTWWAVPFANCNFSM6AAAAAASVJYTXY . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

ozntel commented 1 year ago

it works well for image in canvas,but for image in canvas's card , it does‘t work

The last release should also solve this issue. I needed to implement a whole link detector function to scan the text and find link matches since Obsidian doesn't resolve these links somehow. I also used this opportunity to include any links that might be missed by Obsidian in MD files (i.e. Image/Attachment links within a Code Block)

Let me know if the issue persists. Thanks

HynDuf commented 1 year ago

it works well for image in canvas,but for image in canvas's card , it does‘t work

The last release should also solve this issue. I needed to implement a whole link detector function to scan the text and find link matches since Obsidian doesn't resolve these links somehow. I also used this opportunity to include any links that might be missed by Obsidian in MD files (i.e. Image/Attachment links within a Code Block)

Let me know if the issue persists. Thanks

If the pasted images are in a folder, it would get deleted (for those links in canvas's card). It works when the pasted images are in the root folder somehow.

ozntel commented 1 year ago

If the pasted images are in a folder, it would get deleted (for those links in canvas's card). It works when the pasted images are in the root folder somehow.

Thanks for flagging. I just released a new version and it should be also fixed

cakeeater commented 1 year ago

It's happening again for images inside cards in a canvas that are resized.

![[image.png]] works fine and won't delete anything.

But, let's say you wanted to make the image smaller by setting it to be 150px wide: ![[image.png | 150]] would cause it to get deleted. ![[image.png|150]] won't get deleted.

So, long story short; adding spaces around the pipe | would make it get deleted. So, ![[image.png | 150]] ![[image.png |150]] ![[image.png| 150]] gets deleted.