What is image metadata (EXIF)?
Image metadata is descriptive data stored inside an image file, and EXIF is the standard format for camera details such as date, exposure, orientation and GPS location.
By Rocco Bombardieri · Updated
Want the full walkthrough? Read: Why is my PNG file so large? →
Explained in more detail
Metadata is information about the picture that is not part of the pixels. EXIF, short for Exchangeable Image File Format, is the best known kind. Cameras and phones write it into JPEG files, and both the PNG specification (an eXIf chunk) and the WebP container (an EXIF chunk) can also carry it.
A typical EXIF block lists camera make and model, lens, exposure time, aperture, ISO, the date and time of capture, an orientation flag, and often GPS coordinates showing where the photo was taken. Other metadata types include IPTC (captions, credits, copyright) and XMP (an XML-based format used by Adobe tools). Color profiles and physical pixel size (the basis of DPI) can also be stored, for example in PNG's iCCP and pHYs chunks.
Metadata matters for two reasons. The first is privacy. A photo uploaded from a phone can reveal the exact location where it was taken. Many social platforms strip it, but not all sites do. The second is file size: metadata adds weight, and in some PNGs and JPEGs from design tools the embedded profiles and text chunks add up to a noticeable amount.
The orientation flag is a subtle one. Many cameras store photos in sensor orientation and record a flag telling viewers to rotate them. Browsers apply it by default for displayed images (the CSS image-orientation property defaults to from-image), but software that ignores it shows the image sideways.
Re-encoding through an HTML canvas, which is how browser tools save images, produces a newly encoded file, and canvas encoding does not provide a way to carry EXIF data across. In practice the picture is the same and the camera and location data are gone. If you need to keep metadata, use a desktop tool that edits files in place.