Search for notes with externally linked images

Is there a way to do it? I want my notes to be self contained with all offline images. If there is a way to search for notes with externally linked images, I can manually re-clip them to download offline images.

I think that what you may need is a tool (internal / plugin) that supports regular expression search queries. For example, within the Markdown editor (the latest, not legacy), you may use the search & replace dialog to search for images pointing at URLs like this: (or an enhanced variation on this !\[\w*\]\(http regex)

The drawback is that you have to go note by note and search for these images.

I'm not sure that we currently have a plugin that enables regex search throughout all notes, maybe the VS Code Style Search plugin. If you have no other available option, you could tweak the Inline Tag Navigator to find all such images for you, as a workaround (let me know if you need guidance).

1 Like

Many thanks. I'm not familiar with regex search. If you have a ready to use code to copy paste in the Inline Tag Navigator plugin to search with all notes, I will appreciate it greatly! But it's ok to wait for me to learn more about it if it's too time consuming. :slight_smile:

Again, I'll stress that this is an experimental workaround, and not the intended usage of the plugin. Let's hope it works. :slight_smile:

  1. Go to Settings >> Tag Navigator.
  2. In Search: When multiple tags are matched: Select Add all to query.
  3. In the advanced settings section, write in the Tag regex the following regex: !\[.*\]\(http
  4. In the search panel, type in the tag filter [, then press Enter. This will add all of the image tags to the query.
  5. Press Search, and get a list of all the notes with external images.

Notes:

  • Because these are external images, the panel may try to render them, and this might mess things up a bit.
  • Pressing on the content of a search result card will open the relevant note.
  • You can hide the content of the search results cards (and list only note titles) by pressing on the V button.
  • If the panel becomes too messy, you can display the results in a note instead (watch this 1-min video).
2 Likes

Thank you so much! I followed the instructions blindly, and it seems it worked!

2 Likes