Putting Graphics Inside Table Cells
Can you insert a photo inside a table that will be centered within the cell on InDesign?
You know, if there's one question I hate, it's... well, I guess it's pretty much any question about putting graphics inside table cells. It's not that there's anything wrong with the question -- it's a good question! It's that the answer will invariably include the phrase, "You're not going to like this."
I like giving answers that make people smile, that make people's lives easier. And the answer to anything involving graphics inside cells doesn't do that. It makes people get itchy and want to change the subject.
Putting graphics inside cells should be easy, but it's not. That's because table cells are like little text frames, so any pictures you put in them have to be added as inline or anchored objects. To quote Real World InDesign:
"You place a graphic in a table cell in exactly the same fashion as you insert a graphic in text: click the Type tool in a cell, or select some text inside a cell, then place a file or paste a graphic you copied to the Clipboard earlier. Note that you must select text or have an active text insertion point; selecting the cell itself will not get the graphic into the cell. If you want the graphic to fill the entire cell, make sure the Cell Insets values are set to zero."
That last piece -- setting the Cell Insets to zero -- is very important. If you don't do that, you'll always have some space around the cell.
If the anchored graphic frame is too large for the cell, you can crop it down along its right edge by opening Table > Cell Options > Text and turning on the Clip Contents to Cell checkbox. You cannot, however, crop the height of the graphic. Why? Because the row height cannot be made smaller than the graphic frame. (Well, it can, but you'll get text overset). This is, in a word, frustrating.
You asked about centering the image in the frame. Well, there are two ways to do this.
If the anchored graphic frame is smaller than the cell, you could click inside the cell (next to the image frame) and choose Center horizontal alignment from the Control panel (Command-Shift-C/Ctrl-Shift-C). Then open the Cell Options dialog box and set the Vertical Justification to Align Center.
If the anchored frame is larger than the cell, you'll need to change its dimensions until it's the same size as the cell itself. (If the cell is 7p6 wide, but has a 1-pt stroke around it, then the graphic frame should be 7p6 wide.) Then, with the graphic frame selected, choose Object > Fitting > Center Content.
If only Adobe would change the table feature so that a single cell could act as either a text frame or a graphic frame (as in QX). That would make things so much easier!