Photo metadata
Image files can contain text, thumbnails and other information in addition to the actual image. Photo metadata can describe the camera used to take or make an image, Copyright and licensing information and other information. There are three competing image metadata standards: Exif, XMP and IPTC. All three can be embedded into common image formats without conflicting with each other.
Exif, short for "Exchangeable image file format", is actually a standard for how image data, audio data and metadata tags should be formatted in jpeg and tiff images as well as wav audio files. "Exif" is most commonly used to describe metadata which is embedded into jpeg image files by cameras, phones and image manipulation software.
The standards[edit]
The Exchangeable image file format is the oldest and most widely used photo metadata standard. The first version of the standard was written by the Japanese in the early 1990s. Version 2.1 was defined in June 1998 and an update to 2.2 was written in April 2002. The standard was again revised in 2010 and 2013. The latest version 2.3.2 was defined on May 17th, 2019. The exif specification covers metadata tags in compressed JPEG images files, uncompressed TIFF images, RIFF WAV audio and IMA-ADPCM compressed audio.
Almost all cameras and mobile phone photo applications support and use the Exif metadata standard to save information about digital pictures taken with the device. Most digital photographs have exif metadata a minimum of:
- Camera/phone manufacturer
- Camera/phone model
- Orientation (rotation)
- Date and time
- Camera settings
- An embedded thumbnail of the full image
Image files can contain a lot more than that in the metadata fields. There are a lot of other information which can be embedded into a digital photograph.
Exif is the most common standard for metadata in digital photographs but it is only one of three.
Extensible Metadata Platform (XMP)[edit]
The Extensible Metadata Platform (XMP), created by Adobe Systems Inc, came along in December 2014. It has since become an ISO standard. XMP defines a standard for embedding metadata into images and other file formats like PDF. The data is embedded in a way that makes programs lacking support for XMP data ignore it. XMP can be used to store name/value pairs, structured values and lists of values.
XMP metadata is typically stored using a namespace (with a defined set of properties) followed by a value. Metadata tools recognize values like Xmp.xmpRights.Owner
as being a XMP
value in the xmpRights
namespace called Owner
. There is a list of namespaces and pages listing their possible values at exiv2.org/metadata.html.
There are XMP a lot of schemas available. Many of them are application-specific, programs like the KDE digiKam photo manager, Adobe Lightroom and Microsoft Photo will embed their own custom schema XMP tags into the images they touch.
IPTC Photo Metadata[edit]
The IPTC Photo Metadata Standard is a series of photo metadata standards developed by the International Press Telecommunications Council. They provides a series of metadata attributes that are mostly focused on Copyright and licensing. IPTC does not define a method of storing metadata in images or other files, their standards are only vocabularies for metadata meant to be stored as XMP structures.
The International Press Telecommunications Council would have you believe that
"The IPTC Photo Metadata Standard is the most widely used standard to describe photos"
That is simply not the case, the reality is that nobody outside a few large news organizations care about the IPTC and their "standards". That is likely why the 2017.1 version of their standard opted to simply absorb some of the much more widely used XMP properties into their "standard".
The IPTC standards offers nothing unqie, it can be written off as irrelevant and ignored.
The XMP Dublin Core schema (dc) and the XMP Rights Management schema (xmpRights) cover everything the IPTC datasets define.
Google Image Search[edit]
Google begun making metadata information about an images creator and copyright, if present, available behind a link called "Image Credits" when an image is shown in their mostly useless image search engine. They changed that link to a text field showing the actual data below images in May 2020. Images without Copyright-related metadata get the text "Images may be subject to copyright. Learn More".
The significantly better Yandex and Bing image search engines do not display any image metadata.
The metadata fields Google Images cares about are:
Label | schema | property | value type | exiv2 value | exiv2 datatype |
---|---|---|---|---|---|
Creator | Dublin Core (dc) | creator | seq ProperName | Xmp.dc.creator | XmpSeq |
Credit | Photoshop | Credit | Text | Xmp.photoshop.Credit | XmpText |
Copyright Notice | Dublin Core (dc) | rights | Lang Alt | Xmp.dc.rights | LangAlt |
Copyright Info URL | XMP Rights Management | WebStatement | URL | Xmp.xmpRights.WebStatement | XmpText |
Licensor URL | PLUS License Data Format | LicensorURL | URL | Xmp.plus.LicensorURL | XmpText |
See developers.google.com: Image License in Google Images for additional details.
Software[edit]
Several free software image viewers like geeqie and gwenview let you view an images metadata. Editors like the GNU Image Manipulation Program let you keep and re-save existing metadata embedded into pictures and other image files but it will not let you change the tags. The best option as of late 2020 is, sadly, to use a command-line program.
exiv2[edit]
exiv2 is a very complete and mature tool for viewing and manipulating Exif metadata. Most distributions have it available as a package with that name.
exiv2 will, with no arguments and a image file as a parameter, display a brief summary of a files metadata. Adding -pv
as in exiv2 -pv image.jpg
will show a detailed list of all the metadata.
It can be used to remove Exif metadata from images by invoking it with delete
and a -d something
option where "something" you would like to remove would be
- a : all supported metadata
- e : Exif section
- t : Exif thumbnail only
- i : IPTC data
- x : XMP packet
- c : JPEG comment
- C : ICC Profile
- I : All IPTC data
exiv2 --delete a MSI_RX_470_GPU.jpg
would remove all the metadata from a picture named MSI_RX_470_GPU.jpg.
exiv2
can also be used to add or change all kinds of image metadata.
exiftool[edit]
exiftool
is a handy program for viewing, editing or manipulating exif data embedded into images and a whole range of other file types and formats like PDF files. It supports a wide range of operations. It's default behavior when ran with an image as an argument, exiftool imagefile.jpg
, is to print out all the exif metadata in that image. It has a lot of options for manipulating exif data listed in it's manual page.
exiftool showing the exif data embedded in a typical image.
The command exiftool -all= imagefile.jpg
will remove all exif data from an image while leaving a backup of the original file named imagefile.jpg_original
behind.
exiv2 is easier to use, specially if you want to change many metadata tags in a single operation. exiftool is a totally usable alternative to exiv2 if you are willing to read through the very long manual page and learn how to use it.
exiftool has a homepage at exiftool.org.
Not-standard metadata[edit]
Some multi-national corporations embed special non-standard metadata into their images. Facebook embeds a "Special Instruction" in the IPTC format that contains a mysterious tracking string into all images uploaded to their platforms (Facebook/Instagram/etc).
This "Special Instruction" is not a part of the more common XMP or Exif metadata standards. A lot of software will therefore not show it as part of the regular metadata data. Some programs like geeqie can show all metadata embedded in images, including non-exif data, if you ask it to. The KDE photo viewer gwenview will show the IPTC "Special Instruction", if present, if you choose and click .
geeqie has a advanced metadata view where you can see non-standard metadata embedded into images.
The "Special Instruction" metadata in am image fetched from Instagram shown in qHexEdit.
We can only guess how Facebook uses this "special" tracking code. They could use it to track where images from their platforms are used across the web. They can also use it to track images that are download from their platforms, changed and re-uploaded to their platforms (as long as the image editor understands and re-saves special metadata).
You can use exiv2 or exiftool to strip special metadata with either
exiv2 --delete a <filename>
or
exiftool -all= <filename>
You can also use exiv2 to add "special" tracking data similar to what Facebook embeds to your own images.
Enable comment auto-refresher