The IMAGE function in LibreOffice Calc allows users to insert images directly into spreadsheet cells using a URL.
This enhances data visualization by embedding relevant graphics, such as product photos, charts, or icons, alongside cell content. Users can also control the image size and alignment within the cell for a clearer and more customized layout.
source: URL path of the image file using the protocol "https://" or local path.
destination: A reference to the cell where the image should be placed.
[sizing]: (Optional) Defines the image dimensions. There are several possible values:
Insert the image into the cell and preserve its aspect ratio. Selected by default.
Fill the cell with the image and ignore its aspect ratio.
Preserve the original image size, which may exceed cell boundaries.
Adjust the image size using height and width arguments.
[height]: (Optional) Set height of the image in pixels.
[width]: (Optional) Set width of the image in pixels.
If only one of the height/width arguments is specified, the image's aspect ratio will be preserved according to the provided argument.
Example of Use
Example 1
The IMAGE() function is easy to use. You just need to enter the URL path to the image and the cell where the image should be placed, and Excel (Calc) will automatically insert the required image:
=IMAGE(source; destination; sizing)
We will get the following result:
In this example, the following values are used:
source:B1 - path to the file on the internet ("https://support.content.office.net/en-us/media/35aecc53-b3c1-4895-8a7d-554716941806.jpg").
destination:C5 - cell where the image will be located ("C5").
sizing: preserve the original image size ("2").
Example 2
In this example, the following values are used:
source:B1 - path to the file on the PC ("C:\temp\Lora.jpg").
destination:C5 - cell where the image will be located ("C5").
For Excel, this function is named IMAGE2, to avoid conflicts with the built-in function IMAGE.