How to Insert a Picture in a Cell in Excel

How to Insert a Picture in a Cell in Excel
Product photos in a stock list, staff photos in a contact sheet, logos next to supplier names: pictures make a spreadsheet much easier to scan. The trouble is that normal pictures float on top of the sheet, so when you sort or filter, the data moves and the pictures don't. Placing pictures inside cells fixes that.

Place a picture in a cell (Microsoft 365)

1. Click the cell where you want the picture.
2. Go to Insert > Pictures > Place in Cell.
3. Choose This Device…, Stock Images… or Online Pictures…, and pick your image.
The picture sits inside the cell, scaled to fit. Make the row taller and the column wider to make it bigger.
Because the picture is now the cell's value:
• It moves with the row when you sort.
• It hides when you filter the row out.
• You can copy it, drag the fill handle, and even use it in lookups. An XLOOKUP can return a picture.
Place in Cell is available in Microsoft 365 for Windows and Mac, and Excel for the web.

Turn an existing floating picture into an in-cell picture

1. Click the picture.
2. Right-click it and choose Place in Cell (or use Picture Format > Place in Cell).
The picture drops into the cell under its top-left corner.
To go the other way, right-click the cell and choose Place over Cells.

Use the IMAGE function for pictures from the web

If your images are online, for example product photos on your website, pull them straight into cells:
=IMAGE("https://www.example.com/photos/mug.jpg")
Or point at a cell that contains the web address:
=IMAGE(B2)
Copy the formula down and every row shows its picture. Add alt text as the second argument for accessibility: =IMAGE(B2, "Blue mug").
The address must start with https:// and point directly at an image file (JPG, PNG, GIF, BMP, ICO, TIFF or WEBP).

Add alt text

Right-click an in-cell picture and choose Alt Text (or look under Picture in Cell in the right-click menu) to describe it for screen reader users.

Older versions: lock floating pictures to cells

In Excel 2021 and earlier, pictures always float, but you can make them follow their cells:
1. Insert the picture with Insert > Pictures and resize it to fit inside the cell. Hold Alt while dragging to snap it to the cell edges.
2. Right-click the picture and choose Format Picture (or Size and Properties).
3. Under Properties, choose Move and size with cells.
Now the picture moves when you sort or insert rows, and shrinks when rows are hidden or filtered. It's not as reliable as Place in Cell, but it works.

Troubleshooting

There's no Place in Cell option. Your version of Excel doesn't have it yet. Update Office, or use the Move and size with cells method.
IMAGE shows #VALUE! or #CONNECT!. The link isn't a direct image address, isn't https, or the site blocks it. Open the address in a browser and check it shows just the picture.
The picture is tiny. In-cell pictures fit inside the cell. Make the row height and column width bigger.
The file is huge. Large photos add up. Compress them first, or use Picture Format > Compress Pictures before placing them in cells.

Wrapping up

In Microsoft 365, use Insert > Pictures > Place in Cell and your pictures sort and filter with your data. For web images, =IMAGE(link) does it with a formula. On older versions, set floating pictures to Move and size with cells.