@tommi @yawnbox Hey Tommi, nice to meet you!
I think something like https://github.com/fabianwimberger/immich-convert-originals might be close to what you're looking for? I haven't vetted it (I don’t batch process images for my personal use case), but you can check whether everything is preserved with `exiftool`.
Broadly, there are 3 common image metadata formats you’ll run into: ICC (color information), EXIF (descriptive information about the photo, like your camera specs), and XMP (custom XML). If you procure a test file, run it through whatever tool/script/etc you’re thinking about using (libjxl, libavif, or something else), and check the before & after with `$ exiftool <image>` to ensure the metadata is the same, you should be good to go with any photos similar to the test case (e.g. you know they have the same metadata fields & file format).
Good luck, lmk how it goes!