How to Lock an Image to a Cell in Excel

Pictures in Excel normally float above the grid, so they don’t move when you sort, filter, hide or resize rows. To keep an image attached to its cell, you can either set the picture to Move and size with cells or, in Microsoft 365, place the picture in the cell so it behaves like cell data. This guide covers both approaches, how to stop people from moving or deleting the image, and fixes for common problems. The steps work in Excel 2010 through Microsoft 365.

Quick Answer

Resize the picture to fit inside the cell, right-click it and choose Format Picture (or Size and Properties). On the Size & Properties tab, open Properties and select Move and size with cells. In Excel for Microsoft 365, you can instead select the picture and choose Picture Format > Place in Cell.

Spreadsheet Format Picture pane on the Size and Properties tab with Move and size with cells selected and a picture sitting inside a cell
Move and size with cells keeps the picture attached to its cell.

Method 1: Move and Size With Cells (All Versions)

  1. Insert the picture with Insert > Pictures.
  2. Resize the row and column to the size you want, then drag the picture’s corner so it fits completely inside the cell. Hold Alt while dragging to snap the edges to the cell borders.
  3. Right-click the picture and choose Format Picture (Excel 2013 and later) or Size and Properties (Excel 2010).
  4. Click the Size & Properties icon and expand Properties.
  5. Select Move and size with cells.

Now the picture moves when you sort or insert rows, hides with its row or column, and resizes if you change the cell size. Tip: select several pictures (Ctrl + click, or Home > Find & Select > Selection Pane) and set the option for all of them at once.

Method 2: Place the Picture in the Cell (Microsoft 365)

  • New picture: select a cell and go to Insert > Pictures > Place in Cell, then choose the image.
  • Existing picture: select it and choose Picture Format > Place in Cell (or right-click > Place in Cell).
  • From a web address: use =IMAGE(“https://example.com/photo.jpg”) in a cell.

In-cell pictures are part of the cell value: they sort, filter, copy and delete with the cell, and resize automatically. Add alt text via right-click > Picture in Cell > Alt Text. To go back, right-click > Place over Cells.

Stop People From Moving or Deleting the Picture

  1. Make sure Locked is checked under Properties in Format Picture (it’s on by default).
  2. Go to Review > Protect Sheet.
  3. Uncheck Edit objects and set an optional password.
  4. Click OK.

Pictures can’t be selected, moved or deleted while the sheet is protected. Unlock any cells people still need to edit first (Format Cells > Protection > uncheck Locked).

Troubleshooting

  • Picture doesn’t move when sorting: it must be fully inside the cell and set to Move and size with cells. Pictures that overlap two rows may sort with the wrong row.
  • Picture disappears when filtering: that’s expected behavior with this setting; it hides with its row.
  • Pictures stretch strangely: use Move but don’t size with cells if you change row heights often, or use Place in Cell.
  • Place in Cell is missing: it requires a current Microsoft 365 version. Update Office in File > Account > Update Options.
  • File size is large: compress images with Picture Format > Compress Pictures.

Frequently Asked Questions

Does this work in Excel for Mac?

Yes. Right-click the picture > Format Picture > Size & Properties > Properties. Place in Cell is available in current Microsoft 365 versions for Mac.

Can I lock a picture to a cell in Google Sheets?

Use Insert > Image > Insert image in cell or the IMAGE function.

Why are pictures moving when I insert columns?

They’re set to Don’t move or size with cells. Change the property as described above.

Summary

  1. Fit the picture inside the cell.
  2. Format Picture > Properties > Move and size with cells.
  3. Or use Place in Cell in Microsoft 365.
  4. Protect the sheet with Edit objects unchecked to lock it in place.