Skip to main content

Image Sparklines

Image sparklines display images instead of traditional chart elements. Rather than using lines or bars, they insert icons or graphics—such as arrows, flags, or symbols—to visually represent trends, status, or categories. This type of sparkline is useful when visual indicators are more meaningful than numerical values.

When to use image sparklines

  • Adding visual context: Use icons or images to enhance the data and make it easier to interpret at a glance.
  • Representing non-numeric categories: Display images that correspond to classifications such as weather types, product groups, or status indicators.
  • Simplifying data presentation: Replace numbers or charts with clear visual markers to quickly communicate direction, performance, or change.

Create an image sparkline

  1. On the Insert tab, select Sparklines.
  2. Under Other Sparkline, select Insert Image Function. The ImageSparkline Setting dialog opens.
  3. Set the parameters.
  4. Click Ok. The sparkline is inserted into the selected cell.

Edit an image sparkline

  1. Select the image sparkline in your workbook.
  2. On the Sparkline tab, select Settings. The ImageSparkline Setting dialog opens.
  3. Adjust the parameters, then click Ok.
  4. Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.

Image sparkline parameters

The image sparkline formula supports the following format:

=IMAGE(url, [mode, height, width, clipX, clipY, clipHeight, clipWidth, vAlign, hAlign])
ParameterDescription
SourceSet the image path. Accepts a URL or base64 string.
Alt_TextDefine the alternative text to describe the image. Used for accessibility or when the image fails to load.
SizingSet how the image is scaled: Keep Scale (0), Stretch (1), Original Size (2), or Custom Size (3).
HeightSet the image height when Sizing is Custom Size (3).
WidthSet the image width when Sizing is Custom Size (3).
ClipY(Optional) Set the Y-coordinate (from the top-left) of the cropped area.
ClipX(Optional) Set the X-coordinate (from the top-left) of the cropped area.
Clip Height(Optional) Set the height of the cropped area. Default: full image height.
Clip Width(Optional) Set the width of the cropped area. Default: full image width.
VAlign(Optional) Set the vertical alignment of the image within the cell: Top, Center, or Bottom.
HAlign(Optional) Set the horizontal alignment of the image within the cell: Left, Center, or Right.