# Dashboard 2.0 table image

**URL:** https://discourse.nodered.org/t/dashboard-2-0-table-image/92558
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [21 October 2024 19:06 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558 "2024-10-21T19:06:40Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![madmax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@madmax](https://discourse.nodered.org/u/madmax)
#### Post date: [21 October 2024 19:06 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/1 "2024-10-21T19:06:40Z")

</div>

Hello!

Is it possible to display an image on dashboard 2.0 table?

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [22 October 2024 06:56 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/2 "2024-10-22T06:56:17Z")

</div>

Do you mean within a row of data, or as the background of the table?

---

<div class="post-metadata">

### Author: ![madmax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@madmax](https://discourse.nodered.org/u/madmax)
#### Post date: [22 October 2024 07:23 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/3 "2024-10-22T07:23:11Z")

</div>

Hello!

The link is in the row of data

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [22 October 2024 08:26 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/4 "2024-10-22T08:26:36Z")

</div>

Thanks for clarifying, we could add an "image" cell type, we don't have one currently, but the tricky piece around images is how tall/wide we make the cell.

---

<div class="post-metadata">

### Author: ![madmax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@madmax](https://discourse.nodered.org/u/madmax)
#### Post date: [22 October 2024 08:48 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/5 "2024-10-22T08:48:40Z")

</div>

Thanks for the info.  
I think if the image is 120px high that's enough.

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [22 October 2024 09:24 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/6 "2024-10-22T09:24:06Z")

</div>

Thanks @madmax - I've added it as a Feature Request to our GitHub repo: [Table: Add "image" cell type · Issue #1418 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1418)

In the mean time, you could use a Template node, and build your own using the underlying Vuetify component library: [UI Template Examples | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/user/template-examples.html#custom-data-tables)

---

<div class="post-metadata">

### Author: ![madmax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@madmax](https://discourse.nodered.org/u/madmax)
#### Post date: [22 October 2024 12:50 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/7 "2024-10-22T12:50:45Z")

</div>

Thanks for the help.

Another question: Can I display a photo (base64) on the dashboard? If so, how does that work?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [22 October 2024 15:15 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/8 "2024-10-22T15:15:34Z")

</div>

> [@madmax](#):
>
> Another question: Can I display a photo (base64) on the dashboard? If so, how does that work?

This is a new question. For the sake of future readers looking for a similar feature, it is better off in a new thread.

That said, this has been asked and answered quite a few times already: [Search results for '#dashboard-2 image base64 order:latest' - Node-RED Forum](https://discourse.nodered.org/search?q=%23dashboard-2%20image%20base64%20order%3Alatest)

---

<div class="post-metadata">

### Author: ![xlameee](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xlameee](https://discourse.nodered.org/u/xlameee)
#### Post date: [22 October 2024 21:52 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/9 "2024-10-22T21:52:58Z")

</div>

add column

set it as HTML

my is using function to send data to the table JSON array  
the key of the object is html

`<img src="${item.logoUrl}" alt="logo" style="width: 50px; height: 50px; margin-right: 0; vertical-align: middle; padding: 0;"/>`

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [23 October 2024 08:07 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/10 "2024-10-23T08:07:33Z")

</div>

Have you managed to get that working? Just tried that myself, and it doesn't parse the `${item.logoUrl}`

---

<div class="post-metadata">

### Author: ![xlameee](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xlameee](https://discourse.nodered.org/u/xlameee)
#### Post date: [23 October 2024 14:52 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/11 "2024-10-23T14:52:08Z")

</div>

Use Chat GPT helps a lot with this kind of stuff

Yes it's working perfectly. I have function that reads the global array format a payload and

```auto
let logo = global.get('logos') || []; //checks if it is empty "[]" if not read global array logos

//Here it is formatting the message to return to the table node
return {
  item1: `<img src="${item.logoUrl}" alt="logo" style="width: 50px; 
height: 50px; margin-right: 0; vertical-align: middle; padding: 0;"/>`
};
return msg; // Return the formatted message payload

```

then in the table node

add new column

key: item1  
label: icon  
type: html

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [23 October 2024 17:19 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/12 "2024-10-23T17:19:32Z")

</div>

The code block you have provided doesn't make any sense. There is no `item` variable from which to read `logoUrl`, and you've got two `return` statements, the first of which sends `{ item1 }`, meaning that the `payload` is now empty and therefore the Table node would not have anything to read.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [24 October 2024 06:24 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/13 "2024-10-24T06:24:55Z")

</div>

Here you go:

> <https://github.com/FlowFuse/node-red-dashboard/pull/1422>
>
> \## Description
> 
> This PR supports a new \*'Image'\* type in tables:
> 
> !\[image\](…https://github.com/user-attachments/assets/6f1cdfe1-f7a9-40fc-98ba-d3871c2574d3)
> 
> Also \*\*\*data urls for base64 encoded images\*\*\* are supported, like the Kohinoor Samudra images in the following flow (see \[example\_flow.txt\](https://github.com/user-attachments/files/17502206/example\_flow.txt)):
> 
> !\[image\](https://github.com/user-attachments/assets/049e64fc-1e03-416f-9d33-9713073925ef)
> 
> Which results in the following table:
> 
> !\[image\](https://github.com/user-attachments/assets/7e1ca12c-3f36-4cdf-ba55-d62ce93e2702)
> 
> Note that the \*\*\*last image is truncated\*\*\*. Don't know how to fix that unfortunately...
> 
> \## Related Issue(s)
> 
> \[1418\](https://github.com/FlowFuse/node-red-dashboard/issues/1418)
> 
> \## Checklist
> 
> 
> 
> - \[X\] I have read the \[contribution guidelines\](https://github.com/FlowFuse/flowfuse/blob/main/CONTRIBUTING.md)
> - \[\] Suitable unit/system level tests have been added and they pass 
> - \[X\] Documentation has been updated
> - \[\] Upgrade instructions
> - \[\] Configuration details
> - \[\] Concepts
> - \[\] Changes \`flowforge.yml\`?
> - \[\] Issue/PR raised on \`FlowFuse/helm\` to update ConfigMap Template
> - \[\] Issue/PR raised on \`FlowFuse/CloudProject\` to update values for Staging/Production
> 
> \## Labels
> 
> - \[\] Includes a DB migration? -\> add the \`area:migration\` label

---

<div class="post-metadata">

### Author: ![xlameee](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xlameee](https://discourse.nodered.org/u/xlameee)
#### Post date: [25 October 2024 13:49 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/14 "2024-10-25T13:49:39Z")

</div>

My information comes from the global array where other flows are assembling

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [24 November 2024 13:50 UTC](https://discourse.nodered.org/t/dashboard-2-0-table-image/92558/15 "2024-11-24T13:50:24Z")

</div>

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