> For the complete documentation index, see [llms.txt](https://docs.photoroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.photoroom.com/image-editing-api-plus-plan/preserve-metadata.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
