obsidian-dataview: Inline queries don't handle embedded image links
What happened?
Embedded image links are handled correctly by list and table dataviews, but not by inline queries.

DQL
---
image-embed: "![[Obsidian.png]]"
---
`= this.image-embed`
JS
No response
Dataview Version
0.5.17
Obsidian Version
0.14.6
OS
Windows
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 10
- Comments: 19 (1 by maintainers)
I can concur. I’ve been banging my head against the keyboard trying to get
embed()to work. I have the note and the image in the same folder. I’ve tried with the yaml both with and without the braces.I got this inline DQL to shown an embedded image using a local image file path in the frontmatter:
=" ![[" + this.localCoverImage + "|200]]"In the Obsidian forum @holroy came up with a workaround that wasn’t mentioned here:
Source: https://forum.obsidian.md/t/using-metadata-of-pictures-inside-the-note/57514/9
For me that was helpful. Maybe for some others as well 😊
@pstelzer , I’m aware of the
dataviewworkaround. However, as shown in my above example, I’m trying to put the picture inside of an MD table. Unfortunately, that means I cannot use solutions that are multi-line.@scottmc42, I actually wanted to use it for the same usecase as you do. The suggestion from @fwolf didn’t work for me either. Neither did any form of embed(). The current workaround I’m using is via TABLE (also works with LIST). Borrowing from your example:
This also works with scaled images, e.g.:
The WHERE clause is necessary to prevent the table from fetching all files with the ‘image’ attribute.