What is EXIF?

Dev YadavDev Yadav
2 min read

I'm not sure if, like me, you have ever found yourself in the Properties section of an image file. Here is what it looks like:

Now, the first time I wandered here was to find the exact resolution of an image that I had to work on in Photoshop, and I was fascinated to see that there is a lot more than that available here.

Things like the details about the capture device, exposure time, ISO speed, focal length, the original time of capture, and even GPS Location!

Now why are we talking about all this?

The quest to learn more about this metadata was for a personal project where I wanted to showcase a bunch of photos that I had captured while honing my development skills.

This metadata is known as EXIF or Exchangeable Image File Format*.* It is a standard that defines specific information related to an image or other media captured by a digital camera which is captured by default (in most cases).

Believe it or not, this is a stripped down version of the parsed EXIF data of an image

The need to study more about this format came when I decided to use Cloudinary to host the images that I wanted to showcase.

Now as a feature of this website, I wanted to display this metadata (for those who are much more photographically sound than I am), and what I realized was these EXIF values are not retained when you upload the images to Cloudinary through their direct upload or Upload API.

But, the Upload API does however allow you to add context or custom metadata to the photo. This is where we learn about what EXIF is, and how we can extract it and then manually save it.

Check out this Github Repo which contains the script that I wrote to upload the files from my local machine to Cloudinary with the help of an npm package called exif-parser to extract the EXIF information of each image, and pass it along as context in the Cloudinary Upload API.

Stay tuned for the finished project!

0
Subscribe to my newsletter

Read articles from Dev Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Dev Yadav
Dev Yadav