Does LibreOffice compress images? Not on save, a...

Does LibreOffice compress images? Not on save, and the Compress Image default more than quadrupled our screenshot

By SJ
7 min read
Bar chart of one 1,440 x 900 screenshot: 310,366 bytes as inserted, 1,311,019 bytes after LibreOffice's Compress Image at its defaults, and 251,874 bytes with the resolution box unticked.
On this page

We put a 6,535,144-byte Pixel 8 photo into LibreOffice 26.8.3 for Linux, saved the document as ODT, DOCX, ODP and PPTX, and unzipped all four. The picture inside was 6,426,624 bytes every time, the first 98 percent of our file (GPS position included). Saving a Writer or Impress document in LibreOffice 26.8.3 doesn't compress its pictures.

Four things do: the Compress Image dialog, Minimize Presentation, PDF export, and making the picture small before you insert it. The dialog's defaults turned a 310 KB screenshot into a 1.3 MB one, and PDF export at its defaults re-encodes photos you already compressed. For a Writer or Calc document with many pictures, the last way is usually the fix.

Saving doesn't compress the picture

We inserted each picture from a script with the command that Insert > Image runs, saved, unzipped and compared the stored file with the original:

Picture File size Stored in the document
Pixel 8 photo, JPEG 6,535,144 B 6,426,624 B
Desktop screenshot, PNG 310,366 B identical
The 1,800 x 1,200 photo as JPEG, GIF, TIFF and BMP 0.85 to 6.5 MB identical (the zip deflates TIFF and BMP)
The same photo as WebP, quality 80 372,860 B a PNG of 3,259,995 B
AVIF, HEIC 343,468 and 405,068 B nothing inserted

The Pixel 8 photo lost its last 108,520 bytes, where the file keeps its HDR gain map. Its GPS position and Display P3 profile stayed, so an emailed document still says where the photo was taken.

The WebP came out 8.7 times bigger, and our PowerPoint test saw the same rewrite at 6.5 times. AVIF and HEIC files weren't inserted at all. The install registers a WebP import filter and none for HEIC, HEIF, AVIF or JPEG XL, and on 29 November 2026 the requests for AVIF and HEIC were still open. Convert a HEIC file first with HEIC to JPG, and a WebP file with WebP to JPG to avoid the PNG. Iminify doesn't read AVIF, so export it as JPG or PNG from the app that made it.

The Compress Image dialog opens at 80, not the 90 its help says

Right-click a picture and choose Compress, or use Format > Image > Compress. It handles one picture at a time. LibreOffice's help page says "The default value of 90 produces very good results". The dialog opens at JPEG quality 80 and PNG compression 6 (layout file) with 300 DPI ticked (code), and bug 147456 was filed in 2022 for the gap.

On the Pixel 8 photo, placed 6.69 inches (17 cm) wide, OK at the defaults replaced it with a 2,007 x 1,509 JPEG of 1,020,001 bytes, 16 percent of the original, without GPS position, camera model or colour profile. Against the dialog's own quality-100 picture it scored 79.8 on SSIMULACRA 2, whose scale tops out at 100 and calls 80 "very high quality". On a photo with more pixels than the page needs, the defaults are a fair one-click shrink.

The dialog's 300 DPI box can make a picture bigger

The Compress Image dialog opened on a 1,440 x 900 PNG screenshot placed at 215 DPI: PNG compression 6, Change image resolution ticked, 2,007 x 1,254 pixels at 300 DPI

"Change image resolution to" is ticked by default. DPI here means the picture's pixels per inch at its size on the page, and a picture under 300 is enlarged to reach it. The dialog's Image Information shows the DPI as placed. Our 1,440 x 900 screenshot, placed 6.69 inches wide, is 215 DPI. The dialog offered 2,007 x 1,254 and stored a 1,311,019-byte PNG, 4.2 times the file. A 1,800 x 1,200 JPEG of 852,461 bytes at 269 DPI was enlarged to 2,007 x 1,338 pixels: more pixels, fewer bytes (513,061).

Bug 132657 was filed in 2020 for this enlargement and was still open on 29 November 2026.

With the box unticked, the screenshot was repacked losslessly to 251,874 bytes (19 percent smaller, no pixel changed) and the JPEG was re-encoded at quality 80 to 426,911 bytes at its own size, scoring 75.6 on SSIMULACRA 2 against the original. If Width is bigger than the picture's actual pixels, untick the box.

Impress can shrink every picture at once. Writer and Calc can't.

In Impress, Tools > Minimize Presentation opens a five-step wizard with four presets: Email (96 DPI, JPEG 70), Web (150 DPI, 75, the default), Print (300 DPI, 80) and High fidelity (resolution unchanged, 80). On the Pixel 8 photo placed 8.23 inches wide, Web stored a 1,235 x 930 JPEG of 336,914 bytes, and the file went from 6.46 MB to 0.42 MB.

Writer and Calc have nothing like it. Searching the 26.8.3 menus and command registry for compress, minimize, optimize, shrink and downsample found only two commands for pictures, Compress Image and Minimize Presentation. Bug 34133 asks for a wizard "like Impress has" and had 94 comments on 29 November 2026.

PDF export re-encodes photos at JPEG 90 by default

LibreOffice's PDF Options dialog, Images: JPEG compression selected, Quality 90%, Change image resolution to 300 DPI

File > Export as PDF opens with JPEG compression at 90% and "Change image resolution" ticked at 300 DPI. The Pixel 8 photo became a 2,009 x 1,513 JPEG (the Compress dialog made 2,007 x 1,509) and a 1.43 MB PDF. The same document at other settings (MB are million bytes):

Setting PDF
Default: JPEG 90, 300 DPI 1.43 MB
JPEG quality 80 1.03 MB
150 DPI 0.373 MB
75 DPI 0.0916 MB
Resolution box unticked 5.01 MB
Lossless, box ticked 8.11 MB
Lossless, box unticked 6.43 MB

Lossless with the box ticked is the trap. It stores the decoded pixels, so the PDF was bigger than the 6.5 MB JPEG it started from. Untick the box too and LibreOffice embeds the JPEG's own bytes, the picture as stored in the document, GPS position included, unless the picture is cropped, CMYK or tiny, which it always re-encodes. With lossless off and the box unticked, a JPEG goes in untouched only if it is already small for its pixels, under 0.4 bytes a pixel at quality 90 (source). The pictures LibreOffice re-encodes for these PDFs and for the minimizer's Web preset carry no GPS position.

A picture that isn't a JPEG becomes one only when that JPEG is no larger than a losslessly packed copy of its pixels (code). Our screenshot stayed lossless at the default (0.210 MB) and became a JPEG at quality 80 (0.205 MB). A picture you already compressed gets no pass at the defaults: the 1,087,120-byte JPEG in the next section came out as a 1.24 MB PDF, and as a 1.09 MB one with the box unticked.

Shrink the picture before you insert it

For many pictures in Writer or Calc, the easiest route is the one before LibreOffice sees them. At 300 DPI a picture 6.69 inches wide needs 2,007 pixels (6.69 x 300), and resizing costs less than lowering the quality.

We sent the Pixel 8 photo to Iminify, which is ours, at its default Smart level as JPG, 2,007 x 1,509 pixels: 1,087,120 bytes, identical on a second run, scoring 80.9 against our own 2,007-pixel reduction of the photo. Writer stored Smart's file byte for byte, and the ODT weighed about 1.14 MB. Compress JPEG has a Resize setting; Compress PNG takes screenshots.

A document that already exists can be fixed in place, because ODT and DOCX are zip files. Work on a copy:

  1. Unzip it.
  2. Compress every file in Pictures (word/media in a DOCX) as JPG or PNG, keeping each file's name and format.
  3. Zip it again. In an ODT the file called mimetype must come first and stay uncompressed, as the ODF 1.3 packaging spec says.

A Writer file with the Pixel 8 photo and a Pixel 8 Pro photo (13,056,759 B) went from 19.3 to 2.13 MB (DOCX: 19.2 to 2.09 MB) after Smart at 2,007 pixels wide, and LibreOffice opened and exported both rebuilt files.

How we measured

LibreOffice 26.8.3 (build 26.8.3.1) for Linux x86-64 from The Document Foundation, in a Docker container. A script inserted each picture into Writer or Impress with .uno:InsertGraphic and saved it, and we compared SHA-256 of the unzipped parts and read the PDFs with pdfimages. In a virtual screen we drove the dialogs with mouse clicks.

The photos are from Wikimedia Commons (Pixel 8, Pixel 8 Pro); the screenshot and the other photo are Iminify's published showcase files. We ran Iminify through its API on 29 November 2026 and score with SSIMULACRA 2 from libjxl 0.12.0. The dialog's picture is scored against its own quality-100 picture, because LibreOffice scales differently from our reduction. We ran the dialog, the minimizer, the PDF settings and Iminify twice, and the pictures came out the same each time.

Not tested: Windows and macOS builds, other Linux packages (their HEIC and AVIF support may differ), Calc and Draw, linked pictures, and Word opening the rebuilt DOCX.

Questions this post answers

Share this post

Share on X
Share on Facebook
Share on LinkedIn
Share on Reddit
Share on Hacker News
Email
Copy link
Link copied
Bar chart of the median JPEG size with no quality set: OpenCV 406 KB, ImageMagick 387 KB, Chrome 308 KB, sharp 169 KB, Pillow 152 KB and ffmpeg 123 KB, marked as varying, beside the headline Default JPEG quality: 75, 80, 92, 95, or it depends.

What is the default JPEG quality? ImageMagick 92, OpenCV 95, Pillow 75, sharp 80, and in ffmpeg it depends on the picture

We saved five photographs with nine tools and set no quality on any of them, so each wrote its default: 92 in ImageMagick, 95 in OpenCV, 80 in sharp and 75 in Pillow. ffmpeg didn't use one quality at all: what it wrote depended on the picture. Per tool, the median JPEG ran from 123 KB (ffmpeg) to 406 KB (OpenCV), and the median score from 71 to 94 on SSIMULACRA 2, a perceptual scale where 70 is "high quality". ImageMagick's files were 2.5 times Pillow's for the same pixels. Our advice is near the end: type a number, and start at 75 or 80.

8 min read
Two boxes with areas drawn to the pixel counts: a 4080 x 3072 photo upload of 6.5 MB above the smaller 3319 x 2499 copy of 2.3 MB that Mastodon stored, labelled JPEG quality 75

Does Mastodon compress images? Yes: it re-saves JPEGs at quality 75 and shrinks anything over 8,294,400 pixels

On 25 November we uploaded a 12.5-megapixel Pixel 8 photo of 6.5 MB to a stock Mastodon 4.7.6 server. The server stored a 3319 x 2499 picture of 2.3 MB. Three sources give three different limits: Buffer says 8 MB and about 1.6 megapixels, Mastodon's documentation says 16 MB and 8.3 megapixels, and the server's own API reports 33,177,600 pixels (33.2 megapixels). We ran the server, read its code, and fetched 968 stored images from 121 public servers.

7 min read
Bar chart of what PowerPoint 2024 stored for five files, in MB in and MB stored: JPEG photo 6.5 to 4.9; the same photo as WebP 3.5 to 22.9; as AVIF 3.0 to 4.8; HEIC 0.72 to 0.43; PNG screenshot 0.31 to 0.31.

Does PowerPoint compress images? In our Office 2024 for Windows test it re-encoded big photos and turned a WebP into a PNG

We ran 18 pictures through PowerPoint 2024 for Windows from a script, each into its own deck, then unzipped the saved deck. The 6.5 MB Pixel 8 photo came out as a 4.9 MB JPEG, 3,284 pixels wide, without its GPS position. A 3.5 MB WebP came out as a 22.9 MB PNG. A phone screenshot came out byte for byte as it went in. So PowerPoint does compress some pictures. It measures a photo in pixels per inch (ppi) at its size on the slide. Above 330 ppi it swaps a JPEG or PNG photo for a copy at about 330 ppi (more for our two photos with a rotation tag). In our runs a JPEG was swapped only when the copy was smaller than your file. Word's number is 220 ppi. If you want a small deck, make the pictures small before you insert them.

7 min read

Try it on your own images

Drop a photograph in, pick Smart, and compare the result with the original before you download. Free, no account needed.