Keep a Writer Illustration Attached to the Right Text
An image that moves after an edit may be following its anchor exactly as designed. The important question is what the image should stay attached to: a particular piece of text, a paragraph or a page.
In desktop LibreOffice Writer, work on a copy and identify the paragraph that explains the illustration. Note where the image and its caption should appear when text is added above them. A stable-looking page before editing is not enough to establish the right relationship.
Inspect the anchor before dragging the image again
Right-click the image and open the Anchor submenu. LibreOffice describes anchors as reference points that move with their attached element; the object’s position follows that reference.
As character places the image in the text flow as a character and increases the line’s height when necessary. This can suit an illustration that belongs between paragraphs. To paragraph anchors it to the current paragraph, while To page ties it to the current page.
Choose according to the document’s meaning. A diagram explaining a paragraph often needs to remain associated with that text as pagination changes. A page-specific design element may have a different purpose.
Test the relationship through a real edit
Add several temporary lines above the relevant paragraph in the working copy. Observe where the image goes as the text moves, including across a page boundary. Then undo the test.
Check the caption separately. Selecting an image anchor does not by itself prove that a separately typed caption will stay with it. Inspect both items and the nearby text after the test.
Also review the space around the illustration and whether it interrupts a sentence or obscures content. If the result is unsuitable, revisit the anchor and surrounding layout deliberately rather than repeatedly dragging the object back to its old page coordinates.
Once the behaviour is correct, review the exported or printed pages around the illustration. Keep the editable document with the intended relationship intact so later text changes can be checked without rebuilding the layout from scratch.
References: LibreOffice: positioning objects.