diff --git a/web/packages/new/photos/services/exif.ts b/web/packages/new/photos/services/exif.ts index 87c8b6e163..69c3b4d577 100644 --- a/web/packages/new/photos/services/exif.ts +++ b/web/packages/new/photos/services/exif.ts @@ -92,5 +92,17 @@ export const indexExif = async (_enteFile: EnteFile, blob: Blob) => { // delete (tags as Record).mpf; + // Remove the raw XMP (if any). + // + // The `includeUnknown` flag does not have any effect on the XMP parser, so + // we already get all the key value pairs in the XMP as part of the "xmp" + // object, retaining the raw string is unnecessary. + // + // We need to cast to remove the non-optional _raw property. Be aware that + // this means that from this point onwards, the TypeScript type is out of + // sync with the actual value (TypeScript type says _raw is always present, + // while the actual value doesn't have it). + delete (tags.xmp as Partial)?._raw; + return tags; };