Saving issue with WebP images.

Hello,

I’ve been experiencing issues when using WebP images in LibreOffice Calc. Specifically, when I insert a WebP image into a spreadsheet and save the file, the saving process takes around 3 seconds. However, if I insert the same image in JPG format instead, the saving is instantaneous.

Additionally, I noticed a significant difference in file size. The spreadsheet containing the WebP image is approximately 30 MB, while the one with the JPG version of the same image is around 20 MB.

After examining the saved spreadsheet by converting it to a ZIP archive, I discovered that the WebP image had been converted to a PNG format internally. Given that the original WebP image was only 3.3 MB, I suspect LibreOffice decompresses it during the saving process, which could explain the increased save time and file size.

Here is the resulting files: Proton Drive

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 16; OS: Linux 6.14; UI render: default; VCL: kf6 (cairo+wayland)
25.2.3-3
Calc: threaded

Best regards,

NStar

One picture in a little spreadsheet cell bloats the file up to 30MB.
Image>Right-click>Compress…

Do we need such large images in a spreadsheet?

Let’s open your file (either of the two) and select Compess... in the image context menu.
Compression: JPEG Quality
OK

Now after saving, the file size is reduced by more than 100 times.

This is how tdf#114532 was implemented; commit 60eaa424c5e213f31227008e1ed66a646491a360 explicitly chose to not write WebP, but PNG, for backward compatibility.

1 Like