The IMAGE function in LibreOffice Calc allows users to insert images directly into spreadsheet cells using a URL.
This improves data visualization by embedding relevant graphics, such as product photos, charts, or icons, alongside cell content.
Users can also control image size and alignment within the cell for a clearer and more customized layout.
source: URL path of the image file using the "https://" protocol or a local path.
destination: A reference to the cell where the image should be placed.
[sizing]: (Optional) Determines the image dimensions. There are several possible values:
Insert image into the cell and keep its aspect ratio. Selected by default.
Fill the cell with the image and ignore its aspect ratio.
Keep the original image size, which may exceed the 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.
[lock]: (Optional) Whether to lock the position and size of the image: 0-No, 1-Yes.
If only one of the height/width arguments is specified, the image aspect ratio will be preserved according to the provided argument.
Usage Example
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 have 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 - the cell where the image will be located ("C5").
sizing: keep 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 - the cell where the image will be located ("C5").
For Excel, this function is named IMAGE2 to avoid conflicts with the built-in IMAGE function.