How to use IMAGE function in Excel?

The `IMAGE` function in Excel allows you to insert and display images directly within a cell using a URL. This function is available in Microsoft Excel for Microsoft 365 users. Here’s how you can use the `IMAGE` function:

Syntax

IMAGE(source, [alt_text], [sizing], [height], [width])

Parameters

  • source: (Required) The URL of the image that you want to display in the cell.
  • alt_text: (Optional) Alternative text for accessibility purposes. It describes the image content for screen readers.
  • sizing: (Optional) Determines how the image fits within the cell:
    • `0` for “Fit to cell” (default) – resizes the image to fit within the cell while maintaining the aspect ratio.
    • `1` for “Fill cell” – stretches the image to fill the entire cell, which may distort the aspect ratio.
    • `2` for “Fit and center” – fits and centers the image in the cell with aspect ratio preserved.
    • `3` for “Original size” – displays the image at its original size, which might be cropped if the image is larger than the cell.
  • height: (Optional) The height of the image in pixels. This is used only when sizing is set to `3`.
  • width: (Optional) The width of the image in pixels. This is used only when sizing is set to `3`.

Example

Here’s an example of how to use the `IMAGE` function:

=IMAGE("https://example.com/image.jpg", "Description of image", 0)

This would insert an image from the given URL into the cell, fitting it within the cell while preserving the aspect ratio. The alternative text “Description of image” is provided for accessibility.

Key Points to Consider

  • The source URL must be accessible from the Internet or your network, and the image format should be supported (e.g., JPEG, PNG, etc.).
  • The `sizing` parameter allows you to control how the image is displayed; choose based on how you want the image to appear related to the cell dimensions.
  • The `alt_text` helps with accessibility, providing a textual description of the image for users who rely on screen readers.
  • When using `sizing` option `3`, specify the exact `height` and `width` if needed.

The `IMAGE` function enhances the ability to work with visual data in spreadsheets, enabling more dynamic and visually appealing presentations.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project