Update at some point in the future

Just use Metadata Fixer. It worked painlessly on the first try and takes a fraction of time that this needs.

Why?

I own a Synology NAS and wanted to move all my photos to Synology Photos (with DSM 7.0). So I went to the Google Takeout website and requested all data for Google Photos. An hour after I received the download link to 4 zip files. In this takeout every image also has a corresponding .json file. The problem is: Some files were named wrong, some files didn't have a .json file, some files were in the wrong format and so on. I was really pissed off after a day of trying so I downloaded the images manually from Google Photos. Because you can only download up to 500 photos at a time, I ended up with 14 zip files. I went on with extracting them and moving the resulting folder with all images to my Synology NAS, but all images were marked with "taken today". Synology Photos uses the EXIF data in images to sort them by date, but the downloaded images didn't have the required EXIF data. The files had a creation date, so I used exiftool to copy that, but something always went wrong. Before I finally fixed it, I had a problem where exiftool wouldn't write EXIF data to .png files. I don't know why, but I ended up storing the file creation date from the .png file in the name, converting the image to a jpg and writing the EXIF data from said name. It's probably not the best solution, but at least now everything works. I had to manually add the date for .gif files inside Synology Photos and apparently exiftool can't modify .webp files, so yeah... But hey, it works.

I don't know if other people have this problem but I can't be the only one so here is my solution to the problem. If you need help, feel free to reach out via E-Mail.

I am not responsible for any data loss, you are responsible if you lose data. Always keep a backup.

Requirements

Instructions

  1. Export photos using the selection tool (500-picture bundles)
  2. Name the archives Photos-{i}.zip ("{i}" increments by 1 with every archive and starts at one)
  3. Change the amount of archives in the for-loop and run this script:
#!/bin/bash

for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14;
do
 cd Downloads;
 unzip "Photos-$i.zip" -d "Photos$i" ;
 cd "Photos$i";
 for j in *; do mv "$j" "$i"_"$j"; done;
 mv ./* ~/Desktop/Photos;
 cd;
done;
  1. Copy all .png files into another folder