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 visually enhance 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 statuses.
  • 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
SourceSets the image path. Accepts a URL or a base64 string.
Alt_TextDefines the alternative text to describe the image. Used for accessibility or if the image fails to load.
SizingSets how the image is scaled. Options include: Keep Scale (0), Stretch (1), Original Size (2), or Custom Size (3).
HeightSpecifies the image height when the mode is Custom Size (3).
WidthSpecifies the image width when the mode is Custom Size (3).
ClipY(Optional) Sets the Y-coordinate (from the top-left) of the cropped area of the source image.
ClipX(Optional) Sets the X-coordinate (from the top-left) of the cropped area of the source image.
Clip Height(Optional) Sets the height of the cropped area. If not specified, uses the full image height.
Clip Width(Optional) Sets the width of the cropped area. If not specified, uses the full image width.
VAlign(Optional) Sets the vertical alignment of the image within the cell: Top, Center, or Bottom.
HAlign(Optional) Sets the horizontal alignment of the image within the cell: Left, Center, or Right.