How does Mylio use and update the metadata in image and XMP sidecar file?

Coming from the thread How to hide or move out some keywords I would like to understand how Mylio uses and updates the metadata in image files and XMP sidecar files.

  1. If XMP data and metadata in the image file (EXIF) differ, what is the ground truth Mylio reads from?

  2. And when Mylio updates the metadata, does it write to both?

I ask this because I want to read and write metadata outside of Mylio and need to know what files to target.

Thanks for clarification!

Take a look at What are XMP files? - Mylio

I believe Mylio favours the XMP file over the image file, once it exists, because Mylio does not automatically change the original files by design. Other apps will interwork with Mylio’s XMP file changes for raw images; most will need the metadata directly updated in JPEG images, but Mylio only updates the original file when you tell it to, using ‘Save metadata to file’ on the Photo menu.

Thanks for the support article. It makes things clearer indeed.

So for reading I should use the XMP file when present, and for writing I shoul use teh XMP when present, but if theere’s no XMP I can write either. Does the XMP file, once it exists, contain all metadata of the image?

I would always write to the XMP. If it is not there in my setup, either it is a new import that has had no changes made at all, or something has gone wrong in syncing. In both cases, Mylio will have copied some information into its catalog (an SQL database), and you don’t want that to get out of step. When you write to an XMP file, Mylio spots the change and updates the catalog. This may work if you write to the image itself (but not a raw image), I have never tried it.

I don’t think so. It does contain all the relevant metadata for Mylio’s purposes though, along with Mylio’s image edit settings - so there is extra stuff that isn’t in the image’s own metadata. The XMPs are just text files, you can edit them with a text editor or with exiftool, and you can compare them with exiftool output from the image proper to see what is there.

1 Like