You have a folder full of pictures, perhaps product photos, staff portraits or scanned labels, and you want them in an Excel worksheet next to a list. Excel has no “import this folder” command, so the right approach depends on how many pictures you have and whether each one must land next to a specific value. Here are three practical options.
Step 0: Get the folder ready
A few minutes of preparation prevents most problems later.
- Keep everything in one folder (or two, if your tool supports it), and avoid mixing file types if you plan to use a macro that looks for one extension.
- Check the file sizes. Photos straight from a camera can be several megabytes each. If they will appear small in a cell, shrink them in bulk first. For autoIMAGE, images under about 100 KB are recommended for speed.
- Name files sensibly if you want them matched to a list. See our guide to renaming image files to match your Excel list.
Option 1: Select the whole folder in the Insert Pictures dialog
- Go to Insert > Pictures and choose the option for pictures on your device.
- Open your folder, press Ctrl+A to select every file (or use Ctrl and Shift to pick some), then click Insert.
- Excel adds all the pictures to the sheet, stacked in the same area.
- Set a common height on the Picture Format tab, then use Align to arrange them.
This gets the pictures into the workbook in one go, but Excel does not place them in specific cells, and it does not know which picture belongs to which row. We cover the details in how to insert multiple pictures into Excel at once.
Option 2: A VBA macro that walks through the folder (Windows)
If you are comfortable with macros, a short loop can list each file name in column A and place the picture in column B of the same row. Change the folder path and the extension to suit your files.
Sub InsertFolderPictures()
Dim folderPath As String, fileName As String
Dim r As Long, target As Range, pic As Picture
folderPath = "C:\Images\" ' keep the trailing backslash
r = 2
fileName = Dir(folderPath & "*.jpg")
Do While fileName <> ""
ActiveSheet.Cells(r, "A").Value = fileName
ActiveSheet.Rows(r).RowHeight = 60
Set target = ActiveSheet.Cells(r, "B")
Set pic = ActiveSheet.Pictures.Insert(folderPath & fileName)
With pic
.Placement = xlMoveAndSize
.ShapeRange.LockAspectRatio = msoTrue
.Left = target.Left + 2
.Top = target.Top + 2
.Height = target.Height - 4
If .Width > target.Width - 4 Then .Width = target.Width - 4
End With
r = r + 1
fileName = Dir
Loop
End Sub
To use it, press Alt+F11, insert a module, paste the code and run it. Save the workbook as .xlsm if you want to keep the macro. A few caveats:
- It works through the files in whatever order the folder returns them. It lists the file names, but it does not look up the values already in your sheet.
- It handles one extension per run (change
*.jpgfor*.png, and so on). - It is written for Windows. On a Mac, file paths and permissions work differently, so the code needs changes.
- Hundreds of full-size pictures will make the workbook large; see why your Excel file gets so big.
If your values are already in the sheet and you want each picture beside the matching value, our article on inserting images based on cell value shows a macro that does that.
Option 3: An add-in that matches file names to cells
When the list comes first and the folder second, which is how most catalogs and inventories work, an add-in saves the most time. autoIMAGE reads the values in the cells you select, looks for image files with the same name in your folder, and inserts them.
- Select the cells that hold your values (for example, your SKU column).
- Choose your image folder. autoIMAGE supports up to two folders.
- Preview the matches without inserting anything, if you want to check them first.
- Insert the pictures into the cells, or into cell comments so they show on hover.
Pictures are fitted to the cells with their proportions kept, and they stay with their rows when you filter. It works on Windows (Excel 2016, 2019, 2021, Microsoft 365) and on Mac (Excel 2019 and Microsoft 365). It uses local image files, not remote ones, and if your folder is in OneDrive it should be set to Always keep on this device.
Which option fits?
| Approach | Matches pictures to cell values | Code needed | Platforms | Best for |
|---|---|---|---|---|
| Insert Pictures dialog | No | No | Windows and Mac | Galleries, a few dozen images |
| VBA macro | Only if you write that logic | Yes | Windows (Mac with changes) | Repeatable jobs if you maintain code |
| autoIMAGE add-in | Yes, by file name | No | Windows and Mac | Product lists and inventories |
If some pictures do not appear
- Hidden file extensions. File Explorer can hide extensions, so a file that looks like
SKU-1001.jpgmay really beSKU-1001.jpg.jpg. Turn on file name extensions in the View menu to check. - Stray spaces. A trailing space in a cell or a file name stops a match.
- Leading zeros. If a code such as 00123 became 123 in Excel, format the column as Text and re-enter it.
- Cloud placeholders. Files that only exist online in OneDrive are not really on your computer. Keep them on the device.
Try autoIMAGE on your own folder
The free plan is a 30-day trial that inserts up to 20 images per run, with basic support. The Lifetime Plan is a $69 one-time payment with no subscription, all future updates and no image limit.
For every other technique, see our complete guide to inserting images in Excel.