The new Excel IMAGE function enables you to insert images into cells with a formula. From there you can resize them, sort, filter and more. The IMAGE function supports BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP file types.
The IMAGE function is currently in the beta testing phase so the function arguments may change from what you see here as feedback from testing comes in. It’s currently available to Microsoft 365 users on the Insider Channel for Windows, Mac, iOS and Android.
See the Excel IMAGE Function in Action

Download Workbook
Enter your email address below to download the sample workbook.
Excel IMAGE Function Syntax
Syntax: =IMAGE( source, [alt_text], [sizing], [height], [width])
Source: The URL path entered in double quotes, or cell reference containing the URL, using an "https" protocol, of the image file. Supported file formats include BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP.
Alt Text: Optional. Alternative text that describes the image for accessibility.
Sizing: Optional. Specifies the image dimensions. There are several possible values:
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 arguments.
Height: Optional. The custom height of the image in pixels.
Width: Optional. The custom width of the image in pixels.
Excel IMAGE Function Examples
https://flagpedia.nethosts images of the flags from the world. I used Power Query to download their JSON file containing the URLs for the flag images and loaded them in a table called FlagURLs where I added the IMAGE function to get the images.
I can sort the Flag column, which actually sorts by the URL.
Filtering the table elegantly hides the images with no hint of them being visible unlike shapes and other objects:
The images automatically adjust when you resize cells up to their maximum size if you omit the size argument or use the default size argument of 0:
Unfortunately, currently the minimum size for the tooltip pane is as shown above. And while you can make it bigger as shown below, unfortunately it doesn’t remember the size settings, so you have to resize it each time you hover over the cell!
I can reference cells containing IMAGEs in other formulas, for example I can use SORTBY to extract the flags sorted in order by country name as shown in column E below:
Or use them with data validation and XLOOKUP to return the matching image:
Or correspondingly lookup the image and return the country name from the FlagURLs table:
Excel IMAGE Function Limitations
- Currently only images saved on external sites are supported. Images on SharePoint or OneDrive or stored locally in the file are not supported.
- If the URL requires authentication, the IMAGE function will not render.
- Moving between Windows and Mac etc. may result in irregular image rendering.
- Images don’t display in PivotTables, Slicers or Data Validation lists.
- While the IMAGE function supports GIF files, they only appear as a static image:
Hopefully the limitations above will be resolved before the IMAGE function is generally available.
Andrea
The function can be retroactive with older versions?
If I open a file containing images imported with an older Excel version it will be okay or images will get an #ERROR?
Mynda Treacy
The IMAGE function is not backward compatible. The user can open the file in Excel Online if they don’t have a compatible version.
Andrea
Hi, I’m using the IMAGE function for creating product catalogs.
The problem is that some customers said me that they don’t see the images.
It’s really strange because I’ve tried to open the excel files from many devices and everytime I correctly visualized the images.
When I open the file there’s a warning “Data connections have been blocked”, But I always can see the images imported by IMAGE() function.
the link format for images is this: sample image
It don’t seem to be a blocked content, it’s just a cached image on the website
Mynda Treacy
I suspect the customers are not using Microsoft 365, which is required for this new function. If they have an older version of Excel, then the IMAGE function won’t work.
Andrea
As I thought, thanks for the explaining.
Alice
Hi, my IMAGE function doesn’t work.. i have updated my office version but still.. not working, what may I do? I have 2210 version
Mynda Treacy
Hi Alice, you need to be on the Office Insider beta channel.
Alice
You are very kind, really, thank you very very much.
Ann K. Emery
Nevermind, I solved it!
(I closed Excel and reopened it, and then the regular ol’ align features were working. Phew!)
Ann K. Emery
Hi Mynda! Great article. I’m just using =image for the first time (connected to a slicer and some nested ifs! so fun!).
Do you know if it’s possible to align the image within the cell, e.g., to the left, center, or right of a cell?
Thanks.
Mynda Treacy
Glad you like it, Ann! Yes, you can use the text alignment tools on the images 🙂