It's a blog

Add Exif data back to Facebook images – 0.10

Screenshot of the Facebook Exif tool version 0.10

In 2019 I wrote a post introducing a tool that I created to add Exif data back to images downloaded as part of a Facebook information download. The tool allowed me to download and delete my uploaded Facebook images while keeping some of the useful data such as date taken. After some Twitter pressure I have finally released an updated and slightly fixed version, and it’s time that I wrote a updated guide to go with it!

What is Exif data?

Exchangeable image file format (officially Exif) is a standard that specifies the formats for images and tags used by digital cameras and other systems handling image files.

Snipped from WIkipedia

Common Exif data for an image includes the time that it was taken, the camera make and model and the coordinate data for the location of the image.

This data is different to the data you might find in a file browser, such as “Date Modified”.

Why are Facebook images missing this data?

When you uploaded an image to Facebook, part of the process would remove the Exif data that was attached to the image and store it elsewhere.

As a result, when you download all of your data including previously uploaded images, your images are missing this data. Most of the data is preserved elsewhere in the data download, but it is no longer attached to the image itself.

What does the tool do?

The tool reads through JSON data files that also come with your Facebook information download, finds the extra data that was previously removed, and adds it back to the image file where it belongs.

This allows you to use your images with tools that look for Exif data to improve your experience, such as Google Photos which will insert these images into your collection with the correct date.

How do I use it?

Firstly download the latest version from the downloads page (0.10 at the time of this post).

The tool is distributed as a jar file, and you’ll need Java in order to run it, which you can download here.

You’ll also need to download a JSON dump of all of your Facebook data with high resolution images and extract it locally. You can find the instructions here.

Once you have the tool running you’ll find yourself faced with a simple UI with a few fields to fill out and a few buttons to use.

The first field needs to point to the location of your extracted Facebook information download. This is the directory that contains a “photos_and_videos” directory.

The second field needs to point to a copy of exiftool by Phil Harvey. If you don’t have it already then download it. If the exiftool already exists in your system PATH then this field should be pre filled.

You have the option to alter the files in place (overwrite them). The default mode will create new files when Exif data is added, leaving the originals with the “_original” suffix.

You can then either “Run” the tool or “Dry Run” the tool. A dry run will scan through your data and output the actions that it will perform without actually performing them. A run will modify your files.

Which Exif data is re added?

The tool should attempt to add the follow Exif field where possible:

  • Time taken
  • Time modified
  • The camera make
  • The camera model
  • Coordinate data (latitude & longitude)
  • Exposure
  • ISO Speed
  • Focal Length
  • F number

Troubleshooting

Mac users have reported mixed results, some not being able to use the tool at all. https://github.com/addshore/facebook-data-image-exif/issues/6

Windows users often download the exiftool but leave it with the name “exiftool(-k).exe”. This will not work and you must rename the tool to “exiftool.exe”.

Some users report not being able to see the changed dates in a file browser. This is because the date in the file browser is unrelated to the Exif data.

If you have any other issues please file an issue on GitHub or write a comment on the blog post.

4 Comments

  1. Ben Myton

    This is great!

    The only images that didn’t seem to update with a date are now the ones in the “your_posts” folder. This is a pretty small percentage of my pictures so not a deal breaker.

    I’m tagging this thread for future updates, thanks again!

  2. Kristen

    Hi addshore,

    I downloaded the program and it worked beautifully, until it got to one folder, finished about half of the photos, and then stopped. I closed out of the program and tried to restart it, even moving the folders that were completed and the folder it got stuck on in case it had just hit a bad file – but now it’s stuck at the “looking for albums…” phase. When I run the debug, I get this –

    Task is starting…
    Looking for albums…
    debug: In album dir: C:\Users\Kristen\Downloads\facebook-xxxxxxxx\album

    and that’s all – it just sits there!

    Thanks in advance for any help!

    • Kristen

      hi again –

      I figured out the main issue – apparently moving folders within the photos_and_videos folder causes it to not run! so I put them back, and the program started running again.

      Unfortunately, I still have my first issue – when it gets to a photo in my one album, it just stops. The last line in the debugging is
      debug: calling setImageMeta for photos_and_videos/albumname_photonumber.jpg

      I thought maybe it was just an issue with that photo, so I moved the photo to a different file and ran it again. This time, it just got to the next photo in line and stopped with the same debug (with the next photo’s number). I tried it again, and the same thing happened with the next photo.

      Is there maybe some kind of maximum that I’m hitting?

      Thanks!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2020 Addshore

Theme by Anders NorénUp ↑

%d bloggers like this: