# Node with both text and image?

**URL:** <https://forum.graphviz.org/t/node-with-both-text-and-image/860>\
**Category:** Help\
**Created:** [October 4, 2021, 6:20am UTC](https://forum.graphviz.org/t/node-with-both-text-and-image/860 "2021-10-04T06:20:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milliliter](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@milliliter](https://forum.graphviz.org/u/milliliter)\
**Post date:** [October 4, 2021, 6:20am UTC](https://forum.graphviz.org/t/node-with-both-text-and-image/860/1 "2021-10-04T06:20:14Z")

</div>

It seems like the answer is “no,” but I figured I’d ask:  
Is it possible to put an image in a node after some text?

I’m using html-style labels, so I tried using an html image tag, but that didn’t work. I tried having a label and an image, and that superimposed the two. It’s not critical that I have the text/image thing, so don’t bother testing complex workarounds for me (unless that’s your thing).

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [October 4, 2021, 2:10pm UTC](https://forum.graphviz.org/t/node-with-both-text-and-image/860/2 "2021-10-04T14:10:14Z")

</div>

Two cells within an html-label - one with the text and the other containing the image. You can eliminate the line separating the cells by using the **sides** attribute ([Node Shapes | Graphviz](https://www.graphviz.org/doc/info/shapes.html#sides-example))

---

<div class="post-metadata">

**Author:** ![jjlong](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/jjlong/32/887_2.png) [@jjlong](https://forum.graphviz.org/u/jjlong)\
**Post date:** [October 4, 2021, 10:13pm UTC](https://forum.graphviz.org/t/node-with-both-text-and-image/860/3 "2021-10-04T22:13:10Z")

</div>

You can do it with nodes. The node must be larger than the image. Use the `labelloc` attribute to align the label text to the top or bottom of the node, and use the `imagepos` attribute to align the image to the opposite side of the node. Depending on your image, you may also need to set the `imagescale` attribute to keep the image from scaling up to fill the node.

Shameless plug, [Excel to Graphviz](https://sourceforge.net/projects/relationship-visualizer/) (my baby) has a style designer worksheet and clickable menu. Images and `imagepos` are supported on the far right of the tab menu. You can click shapes, sizes, and other attributes and with each click see how Graphviz renders it. The string of attributes is then displayed.
