How can I filter out images from the graph view that are linked inside the .md files?

What I’m trying to do

I just want to see the .md files in my graph view but the graph view is also showing the images(.svg files) that are linked in these .md files.

these images(.svg files) are the screenshots of the excalidraw drawing that automatically get generated and updated as I make changes to the associated excalidraw drawing

Things I have tried

I tried to exclude the .svg files entirely from the graph and search using the “excluded files” option but they still appear.

Have you tried excluding them through a -path: variant?

the .svg files are created inside the same folder in which my notes are. Excalidraw has no option to create these svg files in folder other than the default folder in which the drawings are created.
so the -path: command will not work to filter out the .svg files

Also I have set the excalidraw files extension to .md instead of .excalidraw. In this way I have two sides of same note (text side and drawing side). I can toggle between both sides and the snapshot of the drawing side gets already created in the same folder as soon as I create the drawing file. If I make changes to the drawing, the old snapshot gets deleted and new one gets created automatically with the same file name and updated content of the drawing.
The utility of creating this snapshot is that I can link it to the markdown side of the file, so that when I view these notes in reading view, I am able to see the drawing content as well as the markdown content. But the problem is that, since the name of this snapshot is same as that of the markdown file, when I view the notes in graph view, the .svg extension files also get displayed in the graph view (reason: because they are linked inside the relevant notes).
I think my problem would be solved if the excalidraw plugin had the option to save the .svg (snapshot files) to a seperate folder. Then I think I can exclude these .svg files by the filtering notes in graph view using the command: -file:“.svg”.
Or is there any other way to solve this problem (for example: using templater scripts or some other simple method)?

Fixed it! Turning on “existing files only” option in graph view filters files other than .md as well as untouched .md files

I’m glad you found a solution, but if you added -path: /\.svg/ to your graph view filter it would exclude any file where the file names ends with .svg, and it doesn’t care if that file is in this or that folder with or without any files. Remember that path is a parameter to match agains the full path of the file, that is folder and file name and extension.

1 Like

Thanks for this! This is new information to me. Where can i learn more about all these commands? Do you have any Docs suggestions?

The Graph filter uses Search syntax.

1 Like