build: 209ms run: 6ms

Image cell

Image cells allow you to use images.

dc.Image("img/wallhaven-0qy15n.jpg")
/tmp/devcards-repo-devcard-examples-1994228840/_transient_/temp-image-2407125735.jpg

An image can be defined in two ways: by using a path to an image file, or by using an image.Image instance. Similarly to annotated value cells, an annotation may be attached to an image:

var img image.Image = stripes()
dc.Image("Path to an image", "img/red-pandas.jpg", "image.Image instance", img)
/tmp/devcards-repo-devcard-examples-1994228840/_transient_/temp-image-1637236758.jpg
Path to an image
/tmp/devcards-repo-devcard-examples-1994228840/_transient_/temp-image-2950952184.png
image.Image instance

prev: Monospaced cells | top: examples | next: Custom cell