Calc does not deduplicate multiple inserted copies of same SVG image

Hi there, it looks like there are a few nuances with regard to image deduplication, at least in LibreOffice 7.4 on Debian 12:

  • Inserting multiple copies of the same SVG image into an ODS spreadsheet results in the file size being bigger by the SVG image size multiplied by the number of copies, i.e. no dedupe.
  • When copying a sheet that contains the embedded SVG it does appear to deduplicate. However, this doesn’t help me because I just need to replace the same embedded SVG on all sheets with an updated version.

Can anybody confirm if this is a bug / limitation or if it’s been improved in later LibreOffice versions, or are there any workarounds? Thanks a lot for the help.

Deduplication was implemented with raster image formats in mind, which are often expensive in terms of storage and I/O. SVGs are usually stored inline in the XML, not as separate BLOBs in the package; such inline elements are not deduplicated.

And no, there was no changes in this area.
Note that deduplication wasn’t intended to help replacing - it is to reduce size and increase loading speed. So your use case just tries to exploit a side effect of that.

Thanks for confirming that.

Right, what I’m interested in is reducing the file size. But the thing is that it does deduplicate the SVG image on a sheet when the same sheet is copied multiple times. The spreadsheet was originally created by copying the same sheet with an SVG image many times. Now I need to replace all instances of that SVG image with another version, and that’s where I’m now having trouble with the file size ballooning.