# Preserve metadata

The Image Editing API allows you to choose whether metadata embedded in the original image should be preserved in the output.

Use this setting if you want to retain XMP or EXIF metadata across processing workflows.

To enable this, set the parameter `preserveMetadata` to:

* `xmp`: [XMP metadata](https://en.wikipedia.org/wiki/Extensible_Metadata_Platform) will be preserved.
* `exifSubsetWithXmpCompatibility` : Preserves the `Copyright` and `UserComment` EXIF tags in the output image.
  * **For `png` output**: These tags are written as both EXIF and XMP metadata. This dual-write ensures compatibility with tools that don't yet support the EXIF chunk in PNG, a location that was only standardized in the [PNG spec in June 2025](https://www.w3.org/TR/2025/REC-png-3-20250624/#eXIf) and may not yet be supported by all image readers. If your downstream tooling reads XMP, your metadata will be found regardless of EXIF chunk support.
  * **For `jpeg` and `webp` output**: Only EXIF tags are preserved. XMP copying is not performed, as EXIF is natively and widely supported in these formats.
* `exifSubset` *(deprecated)*: **Use `exifSubsetWithXmpCompatibility` instead.** This older option preserves `Copyright` and `UserComment` as EXIF tags only, without the XMP compatibility layer needed for PNG outputs.
* `never` *(default)*: all metadata will be stripped from the output image.

{% hint style="warning" %}
Other types of metadata, such as IPTC, will be **removed** regardless of the setting.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.photoroom.com/image-editing-api-plus-plan/preserve-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
