I found Timbo’s tips on how to make a track from photos but it did not work straight out of the box for me.
The problem was two fold; first I needed to change ” to ‘ but also gpsdatetime tag did not exists but changing to DateTimeOriginal made it work:
exiftool -r -if '$DateTimeOriginal' -fileOrder DateTimeOriginal -p ./gpx.fmt ./*.jpg > track.gpx

But it also required me to to modify the gpx.fmt file.