Getting and deleting images / resources

Operating system

Windows

Joplin version

3.2.12

Editor

Markdown Editor

What issue do you have?

I have a way to do this, but it seems rather kludgy, so I wonder if there is a better way.

I write articles for a newsletter. The articles require screenshots and images. I must have the images in my article when I explain them, so I drag and drop them into the articles. When things are mostly done, I upload the images to my website and change the links to point to the website so the html export is correct. However, the resources remain. Is there a way to delete the images and have that delete the resource?

As I'm doing it now, I use the Note Attachments Tool and delete the images after I can see that the website links are working.

Is there a better way?

The Joplin Batch Plug-In is an excellent and easy way to find and delete unused resources

1 Like

Thank you. I've used her service before it was a plugin, and you are right, it is a good way to find and delete. But here, I am deleting pictures and want to delete the related resources. It is actually pretty simple my way. I copy the name, click on the internal function and paste into search, then it pops up and I delete it.

But still, it seems as if, when I delete from the note, there should be an option or popup or something to delete the corresponding resource rather than orphaning it. So, I was checking about whether I was just missing it.

@SteveShank, it might also be that Note History might be helpful? If, for example, your history is set to one month, then these resources must remain to be available for use by the Note History. An approach might be to reduce the time, or even to disable Note History, but then you loose the convenience of that function?
Any way meantime you have your work around.

Tools > Options > Note History

Are you saying that what I'm doing is totally unnecessary? That would be great. Will the resources be automatically deleted when the historical version of the note is removed? So, does it work like this?

  1. I write an article and include local images.
  2. I upload the images to my website and change the link to the cloud
  3. Since I have note history set for 3 days, after 3 days the old version of the note is removed and along with it the resource is deleted.

So, there is no need to remove the resources as they will be automatically deleted in 3 days. Is this correct?

That's what you'd expect, @SteveShank. Although some resources, here at any rate, do get orphaned from time to time. I've never looked further into it, as I occasional run the Joplin Batch plug-in to clean out any hangers on.

But it would be straightforward to test, and check if a known resource was removed after your Note History setting period has been passed.

Best of luck

Too late for March, but since my history is only 3 days, I do think I'll test it next month.