question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline queries don't handle embedded image links

See original GitHub issue

What happened?

Embedded image links are handled correctly by list and table dataviews, but not by inline queries.

Obsidian_Dataview_02

DQL

---
image-embed: "![[Obsidian.png]]"
---

`= this.image-embed`

JS

No response

Dataview Version

0.5.17

Obsidian Version

0.14.6

OS

Windows

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pstelzercommented, Dec 7, 2022

@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:

---
image: "![[truumble-token.png]]"
---

```dataview
TABLE WITHOUT ID
    this.image AS "Portrait" 
WHERE file.name = this.file.name
```

This also works with scaled images, e.g.:

---
image-wxh: "![[truumble-token.png|50x50]]"
image-w: "![[truumble-token.png|50]]"
---

The WHERE clause is necessary to prevent the table from fetching all files with the ‘image’ attribute.

1reaction
scottmc42commented, Oct 20, 2022

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.

---
image: "[[ScreenShot.png]]"
---
## This works as expected, so it knows where the image is and can display it normally
![image](ScreenShot.png)

## Shows the name as a link and hovering will show the image
`= link("ScreenShot.png")`

## Just shows the name as text, not a link any more
`= embed(link("ScreenShot.png"))`

## As expected, shows the name as a link and hovering will show the image
`= link(this.image)`

## embed() fails again; Just shows the name as text, not a link any more
`= embed(link(this.image))`
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't send local image as response to inline query · Issue #146
I have a .jpg file in the same directory as the bot script that I want to send as a response to a...
Read more >
Inline Image or Embedded Image Not Display in Hotmail Web ...
Hi All, Every time I received an embedded images or inline, it will displayed with a gray box, link below: https://a.gfx.ms/i_safe.gif This ...
Read more >
Editing a question to change links to inline images
When reviewing 'First-Posts' and I see a question/answer with images as links, is it OK to edit the post and add in the...
Read more >
Embedding Images in HTML Emails | Campaign Monitor
Embedding an image in an HTML email is still a touchy subject. Our guide includes both embedding suggestions and alternate methods for ...
Read more >
Manage linked or embedded graphics in Adobe InDesign
InDesign displays these images in the Links panel, so that you can control versions and update the file whenever you like; however, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found