How to centre an image in a table cell in writer

I try to centre an image in a table cell, but the cell grows taller.
In order to keep the same cell size, I have to move the image to the right.
Does anybody know how to center the image keeping the same cell size?
Many thanks

1 Like

Right-click image, item Properties. In tab Type (first one in the dialog) set Anchor to paragraph and both Position to center. Alternative, set Anchor As Character, Position Vertical Center to character. Close dialog. Set paragraph alignment to center.

In case the image itself is too large, go to tab Crop in the Properties dialog and set a smaller percent value in the part Scale.

If this does not help, please provide a document which shows the problem.

1 Like

Cells in LO Writer automatically adapt to content size and you can’t constraint size to some fixed value, contrary to LO Calc. That’s per design. A document processor primarily handles text and once text is laid out, “decoration” is applied to it. This includes cell limits.

To achieve your intent, you must then act upon other parameters.

This depends on how the image is inserted, most importantly how it is anchored to text flow. You didn’t give this information. I assume it is not anchored To Page since in this case it would be completely independent from the table, though there are still interactions with cells.

  • Usually the safest way to insert graphic material is to anchor it As Character (right-click on image, select Properties and go to Type tab). The image is then considered as a (very large) glyph as would any other ones. Line height is computed accordingly and cell size adapts to it. You centre it in the cell through paragraph style (horizontal alignment).

  • With anchor To Character, the reference position of the image is the character position of the cursor when you inserted it. In Type tab, position section you can tune the location of the image. I recommend Center within Paragraph text area. Wrap tab further controls interaction with cell: None will force the image to be completely laid out inside the cell; any other option will leave cell height unchanged from what is determined by other text (which means the image may bleed over other cells or rows).

  • Anchor To Paragraph is similar to To Character and offers more versatility in image position. Wrap effect is the same.

  • As mentioned previously, anchor To Page is not recommended because position is made independent from the table.

To sum up, your choice is between As Character and To Paragraph with an adequate Wrap option. Experiment.

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

1 Like