XMP files aren’t actually image files, but they are closely related. And they’re a type of file that photographers run into often.
XMP files are what are known as sidecar files. They’re designed to go alongside the image file, and they provide extended metadata information. XMP files are text files that provide information about an image file that’s associated with it. So the logical place that you’ll run into them is alongside an image file.
XMP stands for Extensible Metadata Platform. It was originally devised by Adobe and has since become an ISO standard.
And I’m referring in this post to XMP files–the ones you see with an .xmp file extension.
Many image file formats, of course, have provisions for embedding metadata information inside them. So JPGs, for instance, might have quite a lot of text information including, such as the camera model, the date, the GPS location, a caption, copyright status and usage rights, and so on. XMP is also used as the standard system for embedding information inside image files without breaking the image files’ compatibility. So XMP information can be embedded inside some image file formats (but not all).
But there are two reasons separate XMP sidecar files serve a purpose.
One is that they can be edited without altering the original file. That’s especially important in the case of RAW files, which are really designed to be treated like digital negatives and never directly edited (that’s where a non-destructive editing workflow comes in).
The second area is that an XMP sidecar file provides far more space and flexibility for far more information. That includes adding whole sections that software designers or camera manufacturers might want to add for customized (and even proprietary) information. For instance, it might include protected information on how a Lightroom filter should process the image. Or a camera manufacturer might include data about the image that only the camera manufacturer’s products can access.
XMP vs XML
XMP stands for Extensible Metadata Platform. XML stands for Extensible Markup Language. They’re related, but they’re not the same thing.
XML is a way (or language) for structuring and presenting textual information. It’s known as a markup. It’s designed to be logically structured and readable by humans. It can apply to many different types of information.
XMP files are special kinds of files that are structured using XML.
The XMP system (or platform, technically) is designed in such a way that different apps can add their own data to the XMP file without disturbing the other data that’s already there. So if you edit an image in, say, Lightroom, then edit it in Photoshop, and then export it from Photo Mechanic, each of those apps will store its information in its own distinct packet within the XMP file, and you can go back and forth between apps without losing information.
Practicalities of Working with XMP Files
Here are a few things worth knowing about working with XMP files.
Can I Delete XMP Files?
It depends. If you delete an XMP file, it doesn’t affect the original image file next to it. But you still might lose important information.
That could include any text metadata you’ve added (captions, etc), or it might include any editing instructions or filters that were applied in an app like Lightroom or Capture One.
If you delete the XMP files and then reopen the images in an image editing app, any previous edits might be lost. But it’s also possible they won’t be. That’s due to the way in which image editing apps like Lightroom save their information. The quickest way to do that is for them to use their own internal database. Depending on the app’s setting, they might then save much of that information into the XMP files. 1
In practice, XMP files are so small in file size–at least compared to the image file itself–that there’s really no need to delete them to save space.
Can I Edit XMP Files?
As a technical matter, it’s possible to edit XMP files directly with a text editor. They’re specifically designed that way, in accordance with XML standards. If you need to batch process a caption or copyright field, for example, you can.
But most of the time, you never need to work directly with the XMP files. And it’s rarely a good idea to edit the data directly because of the risk of introducing a syntax error or making a coding error. There are usually better and safer ways to tackle it, such as editing the metadata through an app like Photo Mechanic or Lightroom.
Do I Need to Include the XMP Sidecar File When Sharing an Image?
No, not normally. In general, XMP sidecar files can be treated as archival files that stay with the original master images. And most image file types that are more commonly used for publishing and sharing photos–JPEG, WebP, or AVIF, for example–have their own provisions for embedded metadata inside the file.
A rare exception might be if you’re sharing a RAW file with a fellow photographer or graphic artist. In that case, bundling the XMP file with the RAW file would allow them to preserve any edits you’ve made.
What Kind of Information is Included in an XMP File?
The information in any given XMP file will depend on what the image has been edited in. The most basic kind of information that’s most commonly present in XMP files associated with a photo captured by a camera is probably EXIF information, which is information about the capture (capture device type, model information, exposure information, etc).
If you’ve edited the image in an app, that app might have saved its own packets of information. Many of the XMP files with my images, for example, reflect a workflow that incorporates Photo Mechanic, Lightroom, and Photoshop. If you’re using PLUS licensing data, that would be included.
- In Lightroom, for example, the manual function for that is under
Library > Metadata > Save Metadata to File. If you’re using Capture One, you can find information about its XMP handling here.