Images inside a dataview table

Hi everyone, I’m trying to display the cover of books I’ve read in a dataview table, but images are way too big, as you can see:


How can I achieve a smaller size? In the single notes I’m just typing Cover:: ![](imageulr).
Thank’s.

If you use something like ![yourImage.png|100] it’ll downsize it. Can also be something like ![yourImage.png|100x200]. Try it out, and see if that doesn’t help you out.

See Embed files - Obsidian Help for more information.

Hello, it does resize on the note but not on data view cells.

Hmm… How does the query look to generate those image currently?

Is it an option to use embed() to have a better presentation of the images?

Inside the note I type Cover:: ![](…) and inside dataview I just add “Cover as Cover”.

With the following code:

Cover:: ![[EBuJo.png]]

```dataview
TABLE WITHOUT ID embed(link(cover, "300"))
WHERE file.name = this.file.name
```

I get the following output:

As you can see, it’s clearly reduced in size inside the table, so try something like that.

1 Like
TABLE WITHOUT ID link(file.link) as "Book" , dateformat(file.ctime, "d  MMMM") as "Create", embed(link(Cover, "300")) as Cover
FROM "/Books" 
SORT file.ctime desc

Here’s result:

Hmm… Try with something like Cover.link instead of Cover, and if that doesn’t work, simplify your query to verify that Cover is actually a link, and do something like:

```dataview
TABLE WITHOUT ID file.name, meta(Cover)
FROM "/Books"
LIMIT 3
```
1 Like

It does not work either way. I think there must be a simpler solution, for example look at this.
The article propose to use:

table Author, ("![coverimg|100](" + Cover + ")") as Cover

But it does not work to me, as you can see:

Are you able to do this with an image of your own, and get the varying sizes?

If so, there is something with how you defined the Cover inline field, in your case. Or possibly with some plugins, but in order to track this down, if you really care to do so, we need to eliminate the various stuff which can go wrong.

I solved.

Problem was that I was using Cover:: ![]… inside a single note thus dataview took the whole text. Solution was to just type “Cover: url” in the frontmatter.

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