EXIF data and orientation
EXIF (Exchangeable Image File Format) is a
storing interchange information in digital photo files. Data such as shutter speed, exposure compensation, F
number, what metering system was used, if a flash was used, ISO number, date and time the image was taken,
whitebalance, auxiliary lenses that were used and resolution are stored by new digital cameras. Some images
may even store GPS information so you can easily see where the images were taken!
Every time you take a picture with your digital camera or phone, a file (typically a JPEG)
is written to your
device’s storage. In addition to all the bits dedicated to the actual picture, it records a considerable
amount of additional metadata. This data can include date, time, camera settings, geolocation coordinates,
orientation, etc. Photo processing software, like Photoshop, can also add further metadata to EXIF.
A lot of this stuff is mundane, but it also can contain potentially sensitive information,
data (GPS coordinates where the picture was taken). That means, if you are sharing images with metadata there
is a lot of details others can glean from them, expecially geotagged data. Moreover, this information increase
the file size, specially with small images like the ones used on responsive web designs. A right image
optimization process removes all this information before compressing the image.
Viewing EXIF data
You cannot stop EXIF metadata from being added to your photographs. It is also a good
practice to save this
information, since it provides useful information to manage your photo gallery later. Creation dates,
geotagging, and camera settings and orientation are valuable data which can be removed later, when the images
are shared and published.
One of the most powerfull tools to view metadata information is ExifTool.
This open source tool is platform-independent command-line application for reading, writing, and editing meta
information in a wide variety of files. ExifTool works on Windows, MacOS, and Linux and it supports many
different metadata foramts including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, etc. as well as the
maker notes of most of digital cameras.
For instance, we are going to take a picture from
StockSnack and see the metadata in it.
Some valid image and photo file types are: JPG/JPEG, TIFF, GIF, PNG, PSD, BMP, RAW, CR2,
CRW, PICT, XMP, DNG.
Geolocation data are useful for geotagging, which creates all kinds of new possibilities,
such as allowing
users on photo-sharing sites to see any images taken in specific locations, view where your pictures were
taken on a map, and to find and follow social events. Howevere they are a data leak when they are directly
shared on the Internet.
Metadata are specially sensitive for photographes, where lots of information are shared in
it, like location
and camera settings. This kind of information is very useful to day-to-day work, but it must be removed when
the image is published and distributed to avoid private and professional data leaks, like with stock
When images are photographed, digital cameras use orientation sensors to store an EXIF
orientation value for
how camera is held. This information is used later to automatically rotate your photos, saving you of this
There are 8 possible EXIF orientation values, which reflect the position of the camera with
respect to the
ground, numbered 1 to 8:
How the 8 possible EXIF values look for the letter F (credit to Dave Perrett)
||the correct orientation, no adjustment is required.
||0 degrees, mirrored
||image has been flipped back-to-front.
||image is upside down.
||180 degrees, mirrored
||image is upside down and flipped back-to-front.
||image is on its side.
||90 degrees, mirrored
||image is on its side and flipped back-to-front.
||image is on its far side.
||270 degrees, mirrored
||image is on its far side and flipped back-to-front.
In the 7 scenarios – 2, 3, 4, 5, 6, 7, 8 – the image need to be rotated before orientation
common photo management programs read EXIF orientation to show photos on the right position. However, browsers
don't perform this task, which means that the image or photo must be rotated before web publishing.
When you rotate or flip an image, EXIF orientation must be removed. Most programs do this
however some programs don't: like Windows Photo Viewer or Microsoft Paint. If you have some problems with
photo rotation, you must fix this issue with a editing software like Photoshop, GIMP, or OSX Preview.
Metadata waste several kilobytes and result in data leak. This is why is recommeded to
remove EXIF data when images are published and distributed. Morevoer, images need to be rotated and correctly
compressed for web pusblishing. To automatically perform all this tasks, you can easily take advantage from
our bulk image compressor for web, and get perfectly optimized images for web with
the best quality.
Start viewing metadata