Share this article:

One of the newest functions available to users of Excel is the IMAGE function. The IMAGE function allows you to insert an image (such as a logo or a product image) into a cell of a worksheet. The function returns a reference to an image that has been inserted into a worksheet.

The syntax for the IMAGE function is:

IMAGE(image_url, [alt_text], [mode], [height], [width])

The arguments for the function are:

  • alt_text: alternative text for the image (in case image doesn’t render).
  • image_url: This is the URL of the image that you want to insert into the worksheet. The image must be in a format that is supported by Excel, such as .jpg, .png, or .gif.
  • mode: This is an optional argument that specifies how the image will be displayed in the cell. The possible values are:
    • 0: Fit the image in the cell and maintain its aspect ratio.
    • 1: Fill the cell with the image and ignore its aspect ratio.
    • 2: Maintain the original image size, which may exceed the cell boundary.
    • 3: Customize the image size by using the height and width (must be selected in order to choose the width & height)
  • height: This is an optional argument that specifies the height of the image in pixels. If you do not specify a height, the default value is the height of the original image.
  • width: This is an optional argument that specifies the width of the image in pixels. If you do not specify a width, the default value is the width of the original image.

Here is an example of how to use the IMAGE function:

=IMAGE("https://www.example.com/logo.png", "logo", 0, 100, 200)

This will insert the image located at the specified URL into the cell, with a height of 100 pixels and a width of 200 pixels. The image will be embedded in the worksheet and will be moved and sized with the cells.

Below is an image embedded into A1 of an Excel Workbook:

excel IMAGE

Here’s a direct link to the image on Unsplash – https://unsplash.com/photos/mm-fHsD4ArI