Media compression tool and media format change tool

You can’t compress an already compressed JPG or PNG much further using standard compression tools. Saving your database to the Gramps .gpkg (Gramps Package) archive format will compress the XML data itself, but it won’t reduce the file size of your images. In fact, due to file headers and archive metadata, packing already compressed JPGs and PNGs inside a zip container can sometimes even increase the total file size slightly.

However, trying to “micro-manage” and shrink your media files to save a few megabytes inside a database app is fundamentally the wrong approach for genealogy. Here is why:

  1. The 300 DPI Rule (Why Resolution is King)

In genealogy, most of our images are historical documents, certificates, and old church books containing handwriting (like gothic script or faded ink). If you reduce the pixel dimensions or drop the resolution (e.g., from 300 DPI down to 150 DPI), you are actually throwing away 75% of the pixel data! You might think it looks fine on a small screen, but the moment you need to zoom in to decipher a single faded name or date, the image will turn into unreadable mud. Once that data is stripped away, it’s gone forever.

  1. The Golden Standard for Archiving

If you want your research to survive the next 50 to 100 years, you should stick to open, lossless, and standardized archive formats. Personally, I never recommend WebP or other modern web-delivery formats for archival purposes. The only formats that truly matter for long-term preservation are:

  • TIFF / DNG (including Linear DNG): For high-resolution, lossless image and camera scans.
  • PDF (ideally PDF/A): For multi-page documents.
  • SVG: For graphic charts, coats of arms, and family trees (since it is XML/text-based and infinitely scalable).
  • Markdown (.md) / Plain Text: For all your notes, ensuring they can be read by any computer centuries from now.
  • PNG: As an absolute fallback for raster images if storage constraints force a compromise, since it is at least lossless.
  • Or any type of LaTeX documents.
  1. Storage is Dirt Cheap – Don’t Destroy Your Data

Instead of ruining the readability of your historical documents, solve the problem at the hardware level. Storage is incredibly affordable now.

The most sensible workflow is to export only your raw tree data as a tiny, lightweight .gramps file (without media). Keep your heavy, high-quality media folder entirely separate on your hard drive.

Then, buy two external 4TB or 8TB hard drives. Use one as your active working disk, and use a simple automation tool like Robocopy in Windows (or a basic bash script in Linux) to regularly mirror and backup your media folder to the secondary drive. It is incredibly simple, perfectly safe, and ensures your descendants will actually be able to read the documents you worked so hard to collect.

A Warning About Long-Term ZIP Storage:
Relying on big monolithic archive files like .gpkg (which is just a renamed ZIP) or standard .zip /.7z files for long-term storage is highly risky.
In compressed data streams, every single bit is critical because all data redundancy has been stripped away.
If a single bit flips on your hard drive (due to cosmic radiation, drive wear, or bit-rot) inside a compressed archive, the decompression algorithm will lose synchronization.
If that flip happens in the central index directory of the ZIP file, the entire archive becomes permanently corrupt and unreadable. You risk losing your entire media collection and database in a split second."

So, if you are creating long-term backups of your Gramps data, the best way to do it is to copy your media files to an external hard drive in their raw, open folder structure, and make a data-only export in XML that you store on the same disk. To be 100% sure, you should also save the installation file of the specific version of Gramps that you currently use. Normally, the latest version of Gramps will be enough, but having the exact executable saved on your backup disk ensures that your data can always be reconstructed, even decades from now.


Note: This text was written in Norwegian and translated to English and edited by my instructions for better readability by Google AI.