How can I set default anchoring for an image?

It takes a lot of clicking to get each
and every new image to line up the
same way – is there a way to just
make this happen in a setting?

I suppose it, there is not such option in the settings. But you can create your own “Insert picture” feature (by writing a macro) that will be insert the browsed image to the actual cursor position with the desired anchoring method.

The following is what I did to get images anchored as character in my writter .ott template:

I use Manjaro Linux 22
and
LibreOffice 7.4.2.3 (2022-11-14)

Saw it on:
superuser com/
/questions/550240/make-libreoffice-writer-insert-pictures-as-character-by-default#675014

Take an Archiver like Ark
open your LibreOffice-Writer Template e.g: default.ott
( /usr/lib/libreoffice/share/template/common/styles/default.ott )

chose the file:
styles.xml

open it with an editor like Kate,
in the upcoming message chose “temporaly raise and limit…”.

search (f5 oder ctrl+f) for:
<style:graphic-properties text:anchor-type=“paragraph”

and replace “paragraph” with “as-char”
<style:graphic-properties text:anchor-type=“as-char”

Save it and start Writer, chose your Template
File > New > Templates > Defaultxxx

Now you can add your images one by one.
Do not insert to many images at a time, this will crash writer.

After “Default anchor for newly added images can be set per Tools ▸ Options ▸ LibreOffice Writer ▸ Formatting Aids” in 7.1, and “Anchor type selector added to frame style dialog” in 7.2, you don’t need to edit the ODF manually. Version 7.4 allows you to configure it in its UI.

1 Like

Thank you, thats right, it works good.
For some reason I have not found this until you told it.

1 Like

There is another approach: frame style.

If you can characterise your images to share many parameters, store these in a frame style (including the anchor mode).

Then insert your image. Select it and assign it your frame style. The anchor mode, position, size, wrap mode, borders, … will all be set according to what is defined in the frame style.