Facebook scrubs all EXIF data from uploaded images. If you want to export them at any point, they'll be missing the original dates.
This script attempts to parse the exported files to obtain a date and a description, then inserts it into the EXIF data for the relevant image. This allows any photo management software to sort them by date.
Caveats:
- The dates Facebook provides are the date and time the image was uploaded, not when it was taken.
- Videos are more limited:
- Processing videos requires ffmpeg to be installed and available on the path
- Processing videos writes a copy of the video, the replaces the original with the new copy. This can take a while and isn't guaranteed to be safe.
uv run restore-exif --help
uv run restore-exif [OPTIONS] PATH
PATH
is the top level folder of the Facebook export.
uv sync
uv run restore-exif