Create typical image style

I would like to add a frame around every image which I include in a LibreOffice Writer file. Currently, I have to select each and every image in my document and repeat always the same action:

  • Right-click the image and select “Properties…”
  • In the “Image” dialogue box, select the “Borders” tab
  • Select the correct Line Arrangement
  • Select the correct Line Style
  • Select the correct Line Colour

Can I create a special Image style (or whatever style) so that an image has immediately all the above when inserted in the document?

Thanks!

Whenever you paste an image, it is enclosed in a frame styled Graphics.

If you Insert>Image from a file, the image is still enclosed in a Graphics frame, but this latter one is itself nested in a Frame frame.

Frame styles are accessed in the style side-pane (F11) clicking on the third icon from the left. As usual a right-click on the style name and Modify allows you to customise the style.

I emphasised above the difference between the two methods to add an image in a document to draw your attention on the fact you might need to modify a different frame for each case. This is not really important if you use only a single method. But if your document has mixed sources of images, modifying Graphics may not be the best option (because it applies in both cases).

You can then define your own style frame, just as you would for a paragraph or page style. Double-click on the name to apply it to a selected frame.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

@ajlittoz: exactly what I found out shortly after I posed the question! See my answer below: created a new style based on the graphics style! I even extended my answer telling others how to connect a shortcut key to it. Might be handy for people facing the same issue…

@GeertVc: Sometimes equivalent answers are given simultaneously. Anyway, I congratulate you for not being passive and having worked out a solution by yourself. This is the best way to learn and master LO. Keep on doing this. Tot ziens!

Ok, found the solution: created a new Image style based on the default “Graphics” style and modified the items I wanted…

I’m just still wondering if I can connect a shortcut to an image style?

Well, also that is solved! For those interested:

  • Go to Tools - Customise - Keyboard
  • Check which shortcut keys are still free. In my case, that was - among a lot of other free shortcut keys - Ctrl+F
  • Select the key
  • In the Category box (bottom-left), expand the Styles section
  • Select Frame: in the Function box you will see your style appearing
  • Select your style
  • In the Shortcut Keys box, while your shortcut is still highlighted, press the Modify button

Your image style is now connected to the shortcut key chosen, that’s it!

My test creating a template file (*.ott), that retain the specification to surround the image with a border and a shadow, does not apply to new images inserted.

I guess that this is a job for the extension Change multiple images in Writer: PicTool. Acording to its description, it allows “Set independently Name, Size, Colors, Cropping, Anchor, Alignment, TextWrap, FrameStyle of (or delete) a single selected image, all images within a selection or all images (if nothing selected). Images can be filtered by name, FrameStyle and skipped by repeated pattern.”

An image of the extension options: