EXIF Data - how can I extract/display EXIF Data on uploaded images?

Can anyone tell me how to (easily) extract/display EXIF Data on uploaded images?

Ideally we are looking for, if possible…

  • Date/Time taken
  • Location
  • Some camera settings

Other info would be useful

I know that Cloudinary and Gumlet have limited output of cached image exif data which you can load over an API call.

Otherwise I think you’d have to look at integrating a library such as ExifReader compatible with Node.

Thanks Max, I have not yet touched Node but ExifReader is probably the direction in which I want to go. I’ll need to do some reading and testing.

Has anyone integrated ExifReader, or similar?

1 Like

You might also be able to get what you need if you’re using PHP - https://www.php.net/manual/en/function.exif-read-data.php

Never realised that there was something built in to PHP (Doh!). I’ll explore that as well :smile:

Out of interest, did you ever get this right @UKRiggers

I see with my Node.js project and Server Connect, that the getImageSize component already uses Sharp to get the metadata.width and metadata.height, I tried to get the metadata.exif and although successful its in an encoded buffer, so I assume I need a decoder or something to make that have any useful meaning to me.

Anyone have any suggestions, or possibly know of any free API services that may work for this. Maybe @patrick could tell us how to decode the raw exif buffer data, not sure.

I didn’t really get any further. I managed to get the basic dimensions and file type. My problem was that my client and his field operatives had been using very old digital cameras and the EXIF data was non-standard. I can’t remember the brand but it was a pain and so gave up. I know that in the last few months new cameras have been issued to some, and others are using their mobile phones instead of digital cameras, so we may well want to revisit this.

1 Like