No description
- PowerShell 100%
| example | ||
| README.md | ||
| Update-GoogleTakeoutPhotoMetadata.ps1 | ||
PowerShell: Google Takeout photo metadata fixer
This repo contains a PowerShell script that embeds Google Takeout sidecar JSON metadata into your image files (EXIF/XMP) using ExifTool.
What it does
Update-GoogleTakeoutPhotoMetadata.ps1:
- Recursively scans a folder for Google Takeout sidecar files:
photo.jpg.supplemental-metadata.jsonphoto.jpg.suppl.jsonphoto.jpg.json
- Pairs each sidecar to its image and writes metadata with ExifTool:
- Date/time:
DateTimeOriginal,CreateDate,ModifyDate - GPS: latitude/longitude (and altitude if available)
- Text: description/title (writes to common EXIF/XMP + Windows XP fields)
- Date/time:
- Skips files it can’t use (missing image, invalid JSON, no usable fields, etc.)
- Prints a per-file summary for updates and a final total.
Requirements
- Windows PowerShell 5.1+ (or PowerShell 7+ should also work)
- ExifTool for Windows (
exiftool.exe)- Install from
https://exiftool.org/ - Either put
exiftool.exeon yourPATH, or pass-ExifToolPath.
- Install from
Usage
Run on a Takeout folder
.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos"
Dry run (no writes)
.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos" -DryRun
If ExifTool is not on PATH
.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos" -ExifToolPath "C:\Tools\exiftool\exiftool.exe"
Notes / behavior details
- Timestamp source: prefers
photoTakenTime; falls back tocreationTime. - Timezone: written as UTC (Unix timestamps from Takeout are interpreted as UTC).
- Sidecar variants:
- When processing
*.supplemental-metadata.jsonor*.suppl.json, if a plain*.jsonalso exists, the script merges missing fields from the plain JSON (time, geo, title, description).
- When processing
- No backup files: ExifTool runs with
-overwrite_original_in_place(no*_originalfiles). - Supported image types: common formats like JPG/PNG/TIFF/HEIC/WebP/GIF and several RAW formats (see script’s
$ImageExtensions).
Example data
The example/ folder contains sample images and *.supplemental-metadata.json sidecars you can use to test the script on a small subset.