EXIF
What is it?
EXIF (Exchangeable Image File Format) is a standard for metadata embedded in image files such as JPEG and TIFF. It stores technical information about the capture — camera and lens model, exposure settings (ISO, shutter speed, aperture), focal length, timestamp and often GPS coordinates and orientation. For web developers EXIF matters because it affects how images are displayed (for example automatic rotation), and because metadata has privacy and performance implications, so web apps frequently read, process or strip EXIF during upload or optimization.
Practical example
Imagine you build a web gallery where users upload photos from their phones. Without processing, some images may appear rotated because the phone sets an EXIF Orientation tag instead of rotating the pixel data. A common solution is to read the EXIF Orientation during upload and physically rotate the image when creating thumbnails, and to strip privacy-sensitive tags (like GPS) before publishing. This can be done client-side with JavaScript libraries (e.g. exif-js, piexifjs) or server-side with tools like ExifTool or ImageMagick, which also helps reduce file size and optimize images for the web.
Test your knowledge
Which EXIF tag do browsers and image libraries commonly use to automatically display an image in the correct orientation?