wtf is xattr?
xattr is a hidden kind of file metadata, which is short for Extended File Attributes. iOS and other operating systems store this metadata about files. xattr’s can store the origin of a file and more as you’ll see below! Because some systems do not support xattr’s, sending a file could remove this metadata. Not many sites explain this obscure metadata, so let’s dive in.
View xattr’s with an iPhone App
Here you’ll learn how to view the xattr metadata of your photos and videos on an iPhone or iPad. To accomplish this, we’re going to use the free Photo Investigator app to see this metadata, so download it now and follow along.
1. Choose a photo or video in the Photo Investigator.
2. Then Tap “Metadata”
3. Then Tap “View All”
4. Scroll down into the iOS Metadata section, then find and tap “Extended Attributes”.
Now you’ll see the xattr metadata for that photo or video. By the way, if you want to copy any value, just hold down on it.
Interesting xattr Metadata
com.apple.metadata:kMDItemWhereFroms
If someone sends you a picture downloaded on their Mac, the URL they downloaded the image from is in this xattr. Although iOS doesn’t seem to store this attribute, it may soon. What an odd way to trace the source of an image!
com.apple.assetsd.creatorBundleID
This attribute stores the app that saved the image. If you can’t recall where an image came from, this could be useful. For example, when you post on Instagram, the app saves your photo with filters, and this xattr contains the value com.burbn.instagram, the “bundle ID” of the Instagram app. Before Facebook bought Instagram, the app’s company name was Burbn!
com.apple.assetsd.originalFilename
Under this attribute, you will find the original filename of the photo/video. The Photos app renames all imported content using its naming scheme, so the original filename can be useful to match images from your computer to the images on your phone. Also, the original file name also could have included some useful description of the content.
com.apple.assetsd.description
As of iOS 14, in the Photos app you can add a caption to a photo when you swipe up, but the EXIF metadata does not store the Photos app caption. Instead, the Photos app squirrels away the caption into this xattr.
This article is not an exhaustive list of extended file attributes, but other xattr’s may store your current place in a file or describe text encoding.
For example, here are some other noteworthy xattr’s:
com.apple.assetsd.
Creation Date of the photo/video
com.apple.assetsd.timeZoneName
Time zone when taking the picture
com.apple.assetsd.
The offset of that time zone from GMT.
com.apple.assetsd.
If the item is a favorite in the Photos app.
com.apple.assetsd.hidden
If the item is hidden in the Photos app.
Final Thoughts
Please send any tips to the Photo Investigator about decoding any of the more mysterious values. For example, the app displays “Custom Location” as the raw data value (but this value probably matches the other location information).
We hope you learned something interesting about xattr Extended File Attributes. Now, try the Photo Investigator!
The Photo Investigator App makes viewing, editing, removing and sending photo metadata easy. Photo and video metadata may include location (if enabled by the camera), date, device, software versions, file size, file name, an “iOS Metadata” section including what albums a photo is in, and many more metadata items. Users can view and share DEPTH MAPS by selecting a portrait photo and tapping “Portrait”.