How do I prevent LibreOffice saving the file with the thumbnails?

Take a look at the answer here of LibreOffice configuration.

According to the post, the choice of saving a preview thumbnail is a setting that you can change:

    Tools → Options... → LibreOffice → Advanced → Expert Configuration

Select the preference named: org.openoffice.Office.Common/Save/Document/GenerateThumbnail

Double clicking on it toggles the value to false.


In fact, a LibreOffice feature is the creation of thumbnails, so you could see a "preview" of the contents instead of the Writer icon in file manager. Check for yourself by changing the extension of (a copy of) one LO document to .zip and open the Thumbnails folder.

I don't know if it is possible to disable this feature.

Looking around in Ask.Libreoffice, I found the following:

  • That more details are given here

  • That you can find instructions on how to remove that image in the answers to this question.

In summary:

  1. Rename your file to filename.zip.
  2. Open .zip file and, from within file-roller, peazip or whatever you are using.
  3. Navigate to the folder META-INF and open manifest.xml in gedit or equivalent plain text editor`.
  4. Delete the line

    <manifest:file-entry manifest:full-path="Thumbnails/thumbnail.png" manifest:media-type="image/png">

  5. Back in the main folder of the zip file, delete the folder Thumbnails.

  6. Close and rename back to the original ODF extension.

Note: This is valid for LibreOffice files, irrespective of the OS.

As for the OP's question, is a matter of either disabling the thumbnail preview as suggested in comments or deleting the thumbnail and setting a password so the contents of the file cannot be seen by anybody, depending on what the real needs or desires are.