I couldn’t find anything this specific by the search, so here’s my question. I’m trying to build a database of people in Obsidian, and I’m running into a particularly frustrating (to me) hiccup. I’m trying to embed a picture of the person the page is about, but define that picture in the metadata so that it can be changed (either via MetaEdit or Database Folder) without needing to edit the note directly.
Things I have tried
Right now I have a fake person, Ryan Green, I’m using as a template. In the front matter of his note I have the value portrait: that links to the attachment of his picture [[Ryan Green Portrait.jpg]]. I’m using an infobox callout snippet to generate a Wikipedia style info panel. In the callout, I have tables of info categories all being populated from the metadata. I’m making calls like =this.firstName, =this.email, etc. and all is going well, except the profile picture. Several of the iteration I’ve tried are:
!=this.portrait
!$=current().portrait
="!"+this.portrait
$=“!”+ current().portrait
etc.
It will often display !Ryan Green Portrait or sometimes just a link to the attachment. It looks like the ! is rendering before the inline calls, and therefore not embedding. I’ve tried portrait defined as metadata, as well as inline in the body of the note as portrait::. I’ve even tried defining it as portrait: “![[Ryan Green Portrait.jpg]]” much like the banner plugin does in order to have the inline call also render the ! to display the image. No dice.
The Question
Is there a way (preferably without a custom .css snippet) to do this without simply typing ![[ProfilePicture.jpg]] manually on each person’s note?
If all else fails, use a table or a list? Or wait for Datacore to see if things change for the better?
---
portrait: "![[test.png]]"
firstname: Woof
email: [email protected]
---
# Table
```dataview
TABLE WITHOUT ID
portrait,
firstname,
email
WHERE
file.path = this.file.path
```
# List
```dataview
LIST WITHOUT ID
portrait
WHERE
file.path = this.file.path
```
- `=this.firstname`
- `=this.email`
Thanks for the suggestions everyone. Unfortunately, none of them seem to be working for me. I am working 100% on an iPad, which may affect some of it, but I wouldn’t think so.
Here’s a side by side of my various attempts and their output:
I think @eightning is right, and I might just hold out for datacore. In the mean time, I might try to learn css and write a small snippet to handle this specific task. I’m sure that skill could come in handy later.