Add Exif data back to Facebook images – 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.
[…] EDIT: Version 0.10 was released in April 2020 https://addshore.com/2020/04/add-exif-data-back-to-facebook-images-0-10/ […]
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!
Thanks for the feedback, I filed an issue and hopefully will look at it next time i’m working on the project!
https://github.com/addshore/facebook-data-image-exif/issues/14
[…] My top 2 blog posts in 2019 were some of the fastest I have ever written, just for those niggly little annoying things. The only other topic really represented is my Facebook Exif image tool, which now has a new updated post here. […]
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!
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!
Hey man, I’m the guy who’s comment you commented to on Twitter in the chat with oddheader, there is a mystery on the internet dealing with the game called Ben and Ed, so far if no one made any progress in the mystery that is, there a couple of photos on a Facebook page that are locations that we need to visit, but in these photos nothing really give away where the place is, so I thought maybe bringing exif data back into the photos might help, but would your download allow you to get exif data back into photos from another profile. If so this could help the hunt for these locations, but it could also be a bad thing for others cause random people could just use this application to learn where others live. Well just let me know if it can or can’t, any lead possible will help.
Not for another profile I don’t think so!
[…] Redirection allows me to easily create internal redirects for pages that I move, or any 404s that happen. This plugin also collects any 404s that are served by WordPress so that I can add redirects in paths that I have forgotten about. I also use this redirection functionality in some apps that I write so as to have stable redirects to important places. For example, /redirects/exiftool/exiftoollink as used in my Facebook (sorry, Meta?) exif tool. […]
[…] Add Exif data back to Facebook images – 0.10 (new to top 10 in 2021) […]
When I select the folder of images in the first field, it gives me an error message saying the location doesn’t exist, but I’m using the browse feature to select the folder. Can anyone please help? When I go into the video or images folder, no files appear either, neither do the .json files.
One thing to note though, when I download the data from facebook, I only selected to download my message history, will that affect anything?
Hi there,
You need to download you pictures / media, not messages!
This application isn’t designed to work for message right now!
Hello is it possible for videos? Any script for saving videos backup with dates and hours?
I dont think videos was implemented in this solution, and I’m not sure how hard it would be
Hi there,
Struggling to get this to work on Win11. Using v0.12, and selecting the “your_activity_across_facebook” folder, the app finds the JSON files, and identifies the correct number of photos per folder. However I’m still getting the error that says (as an example):
“Processing your_activity_across_facebook/posts/media/06July2011_8HJsTELvlw/277793_10150699999200252_875118_o_10150699999200252.jpg”
“ERROR: the file does not exist in the expected location. Is your download complete?”
It looks like the photos are in the correct location as per the URI.
All help appreciated! :)
So this message occurs when the program can’t find the image file.
https://github.com/addshore/facebook-data-image-exif/blob/bf6621883caa1a694151e05d2d1a022598474ff4/src/main/java/com/github/addshore/facebook/data/image/exif/ProcessingTask.java#L187-L190
Just before that error output is a debug line that will tell you the exact path it’s actually trying to load.
Try again with the debug checkbox checked, and have a look at the new output!
The tool doesn’t seem to work anymore. Without JDK, without IDE, I tried to make a new javascript tool slightly inspired by it.
If it can be useful to someone:
https://cdn.githubraw.com/bobledeveloppeur/fb-export-exif-merge/main/fb-exiftool.html
Amazing, I hope it works for people.
My project is certainly in maintenance mode and I might consider archiving it soon if your tool is working well!
Hi addshore,
Looks like a great tool and hoping to get it working for me.
Exiftool ver12.77, FDIET ver0.12, Java 8 update 401. Windows 10. Downloaded json albums and get the following error: Directory does not exist: \your_actvity_across_facebook\posts\album
I’ve confirmed both Album and Media have files but not sure how to run the github to see the error log. Could you share what path it is looking for so I can amend the file path?
Thank you
Hi there,
This tool is probably in maintenance mode now, but you might want to consider looking at https://github.com/bobledeveloppeur/fb-export-exif-merge
Let me know how it goes!