In some cases, I have images embedded in my markdown-files using the base64 representation of the image (mostly in documents which I have converted from docx Word-Files when I switched away from MS-Office toward Obsidian).
As a consequence, using the global search sometimes produces bogus-results cluttering the result-list because the search-query just happens to be contained in the base64 representation of some image somewhere.
Proposed solution
The content of data-urls of e.g. format data:image/png;base64 could be excluded from the search. I sincerly doubt that anyone will ever try to search for those base64 strings.
Current workaround (optional)
Well you can of course include the images as separate files - but only if you still have them.
A piece of friendly advice: get rid of those bogus images.
You can also hunt some Word macros off of the net which will yield full resolution image files of your doc files.
hello , I wrote a python script which can replace your base64 picture with the oridinary picture. This is the url : “ht请tps://github.com/WuHong删除Qiang333/repalc我e_base64pic_with_pic_in_obsidian/blob/main/replace_pic_of_base64_in_obsidian.py”
Search results display matching strings from within image-data (a pasted image)
I’m searching for DMZ in my notes (as an example), and the top result is this large string
“…mQ6E5EMBx…DMZ…INENtsBblg…”
If I click on it, I am taken to a page filled with the same gibberish text.
If I hit ctrl+Home or ctrl+End, suddenly the gibberish text is replaced with an image. Turns out I was looking at the text of pasted-in image.
I found this happens when I copy images from my email client.
Here’s an example of a tiny-square image as copied to obsidian:
Proposed solution
I propose that when matching strings in search, if it’s from inside a data:image/ tag that it be ignored / dropped from the search results.
I don’t know anyone who’s going to be searching for text within the base-64 encoded text of an image.
Now if they’re searching specifically for data:image/png;base64… that might still be relevant.
But not for me. I never pay attention to the format in which I paste images.
Current workaround (optional)
Workaround; ignore search results when I see them, often scrolling down to see relevant results.