How to set an image to link to a specific file?

At first glance, I thought this was a simple question. But there’s more to it. So…

First you have to know that Obsidian supports two different kinds of links for internal linking:

  • Markdown links, typically in the form [cat](birthday.md)
  • Wiki style links, typically in the form [[birthday]] or [[birthday|cat]]

The same applies for embedding local images:

  • Markdown image embed, typically in the form ![](cat.png)
  • Wiki style image links, typically in the form ![[cat.png]]

If you want an image as a link, you need to place an image embed inside a link. However, there are only some combinations that work and some that don’t.

Placing a wiki embed in a Markdown link does work:

Placing a Markdown embed in a Markdown link should work, but on my side the link doesn’t work as expected. (Might be related to this bug in Obsidian.)

[![](cat.png)](birthday.md)

Placing Wiki or Markdown embeds in Wiki style links seems not to work either. (I haven’t checked if there’s a feature request.)

[[birthday|![[cat.png]]]]
[[birthday|![](cat.png)]]
2 Likes