IMAGE function

If you use Power BI Desktop to create business reports, you probably know that it is possible to insert an image into a table that is displayed based on its URL location. As of recently, if you are a Microsoft 365 subscriber, you can also do this in Excel using the IMAGE function. In this “recipe” you will find out how it is used…

The syntax of the IMAGE function is:

IMAGE (<source>, [<alt text>], [<sizing>], [<height>], [<width>])

The first argument of this function is source. This can be the location on your computer or the URL from which the image is retrieved. The second argument is the alternative text. This is the text that is displayed as a notification if the image has not loaded (you can skip this). The third argument represents the way the image is displayed inside the cell. It can take values: Fit Cell (fills the cell and keeps the aspect ratio of the image), Fill Cell (fills the cell and ignores the aspect ratio), Original Size (displays the image in its original size) and Custom (own dimensions of the image). In case you chose Custom sizing, you can enter two more arguments: height and width.

In the picture below you can see how this function is applied in practice.