Image management and dataview queries

Hi guys,

I’m using Obsidian as a simple notetaking app, categories and notes, as I’m not fond of any particular methods.

I actually see some value in the dynamic queries offered by Dataview, so I’m trying to integrate it into my workflow.

More specifically, I like taking pictures and add some comments to them, but I like to keep every subject confined in a single note.

For example I have a note listing all the onigiri I tried, with a simple comment, organized in a statically created table.

What I would like to achieve is a ways to automatically list all pictures in a folder and manually add some comments. Is there any way to do this without manually embedding all pictures?

So far, I only came up with the idea of adding this frontmatter object and parse it with Dataview:

  - path: "__assets/Onigiri list/IMG-20240322012235862.png"
    type: Vegetables
    note: "No taste at all"
  - path: "__assets/Onigiri list/IMG-20240322012235894.png"
    type: Vegetables
    note: "Pickles are particularly strong"
  - path: "__assets/Onigiri list/IMG-20240322012235926.png"
    type: Meat
    note: "The beef is spicy"

Anyway I can’t find a way to parse this into a table with image embeds…

Do you have suggestions about the query or even about what could be a better workflow?

Thank you very much!

So far I have this dataview query:

table without id list[0].path, list[0].type
from "Food & Recipes/Lists"
where file=this.file

But it’s only for the first item. Any idea how to loop all items?

Ok, seems like flattening the objects inside the array makes for a good workaround without resorting to dataviewjs.

table without id list.path as Picture, list.type as Type
from "Food & Recipes/Lists"
flatten list
where file=this.file

Changing the path keys to embeds instead of strings allows the images to be embedded in the table, that is the result I want to achieve.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.