I have thousands of RAW files that I've always saved in their original state (e.g. _DSC 2104) of which I now have dozens of that number in their respective files, thus showing that I am a creature of habit. I've always wondered if I edit the photo vigorously in RAW, saving file as a psd. file, does the Raw file then revert, as if untouched, back to its original RAW file? Then, if I delete the .xmp file, is the file back to an untouched RAW file?

Then a more ignorant question: If I rename the files do they simply have a different name, untouched as it were, then followed by the .xmp suffix?

  • Your last question: do you mean if you have a DSC2104.NEF (or CR2) raw file, and a DSC2104.xmp, and rename the DSC2104 raw file to something else, do you also have to rename the xmp file?
    – MikeW
    May 12 '15 at 22:13

Many image processing programs do what's called nondestructive editing, where the original file is treated as you would a film negative and left untouched. Realistically, there's not a whole lot of reason to store the finished image in raw format because it's not a format that's often consumed by anything looking for a finished product. In some cases you might export to JPEG, TIFF or PNG for direct use or to PSD or some other format that feeds the next step in your workflow.

Programs like Lightroom, Darktable and AfterShot accumulate the list of the actions you took in a sidecar file such as the XMPs you're seeing along with the originals. (XMPs have a common format that allows other programs to get information about the images but leaves room for program-specific information.) Some programs maintain these changes in a database instead of files, but the concept is the same. Removing the sidecar will remove the program's knowledge of what you did, effectively reverting the image back to its original state. That said, many programs will allow you to develop multiple versions of the same original image by storing the changes in multiple sidecars.

Renaming the files may or may not be a safe thing to do, but that depends entirely on what software you're using. Some programs maintain a database of the images they know about, and renaming DSC1234.NEF and its corresponding sidecars to something else will leave things in a confused state if you try to go back to it later.

Check the documentation for the software you're using to be sure, but in most cases there's no need to keep a second copy of the raw file.

  • 1
    Lightroom has the option to store changes to sidecar files. It can also save edits in its library/database so keep that in mind.
    – dpollitt
    May 12 '15 at 22:31
  • @dpollitt: The OP didn't specify a program, so I tried to keep it generic. I'll update the answer to cover that.
    – Blrfl
    May 12 '15 at 22:34
  • 1
    Ya I knew you knew but I'm just afraid that people might assume LR is doing something that I don't believe is default behavior and can really be a shock for some when it comes to backup/restores!
    – dpollitt
    May 12 '15 at 22:35

Deleting the XMP file does not cause the Raw file to "revert" to original state. Because Raw files are NEVER edited. The VIEW will revert, but the Raw file data was never changed. Instead, the LIST of edit changes are saved in the XMP file, and at any access of the Raw file, those edits are applied to the output we see. Subsequent edits only edit the LIST of changes in the XMP file. This is why it is called lossless edits.. for example, if we delete the saved Crop instruction, we see ALL of the original pixels again, which never changed in the Raw file... they were always there. Raw files are Never modified, never ever.

Saving a PSD in Photoshop is no longer lossless. It is RGB, not Raw. The original Raw state is not accessible from the PSD. You would have to discard the PSD, and go back to the Raw, to obtain the original. Which is just normal business for Raw files, simply how Raw works. Lossless edits.

If you have done extensive edit in regular Photoshop, there may be good reason to save it (PSD, TIF, whatever). But if you do the edit in the raw editor, then plan on the XMP and Raw file as being your archived master copy. Otherwise, you're giving away your advantages.


Editing in RAW (using software which creates sidecar (XMP) files) modifies the XMP file. If you then open in Photoshop, those edits are only stored in the PSD file. The original RAW edits are still untouched in the XMP file.

Think of it as the RAW file itself not being changed at all, but your raw edits being saved in the XMP file, and applied by the raw editor (or Photoshop) when the raw file is opened.

If you delete the XMP file, you remove the source of the history of changes, so you effectively revert the RAW file to its original state.

Unless you use Adobe Camera Raw within Photoshop (which can write RAW changes to the XMP file), anything you do in Photoshop doesn't affect the RAW or XMP files, and when you save, it does not remove the XMP file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.