Applies to macOS Ventura through macOS 27

The short answer: a GPX track is a list of positions with the time each one was recorded. Your photos carry the time they were taken. Geotagging from a GPX file means looking up each photo’s time in the track and writing the position found there into the photo. On a Mac, three tools do it properly: Lightroom Classic (Map module, if you already subscribe), the free command-line ExifTool (one command, no preview), and since version 1.03 Media Location Tagger, which draws the track and every proposed position on a map before it writes anything. All three depend on the same single thing going right: the camera’s clock, and above all its time zone, has to agree with the track’s.

A disclosure: I’m the developer of Media Location Tagger, the third of those tools. The other two are covered first, with what they do well.

Three boundary checks before you start:

What you need

A recorded track, not a planned route. A recording made while you moved has a time on every point. A route you drew in a planning app, or a download of someone else’s hike, usually has none, and without times there is nothing to match against. Open the .gpx file in a text editor: a usable track has <trkpt> entries with a <time> line inside each.

Photos with their capture time intact. Straight off the card is best. Files that went through a messaging app or a web gallery often lose it.

The camera’s time zone. This is the part that goes wrong. GPX times are in UTC. Cameras record local time, and most don’t say which zone they mean. The software has to be told, or it guesses, and its guess is usually the time zone your Mac is in today, which is wrong for any trip abroad and for any camera that was left on home time.

Where the GPX file comes from

Anything that records where you were can produce one: a fitness or hiking app on the phone, a GPS watch, a bike computer, a dedicated logger. Look for Export GPX on the recorded activity, in the app or on the service’s website. Two things to know:

  • Export the recording, not the course. Several services offer both; only the recorded activity has times.
  • GPX, not FIT. Watches and bike computers record in their own formats (Garmin’s is FIT). Lightroom and Media Location Tagger read GPX only, so use the service’s GPX export. An Apple Watch has no export button of its own; the Health app’s Export All Health Data includes each workout’s route as a GPX file.

A recording of the whole day works better than one per activity. Photos taken at the café between two recorded walks have no track to match.

Route 1: Lightroom Classic (if you already subscribe)

  1. Import the photos and open the Map module.
  2. Choose Map ▸ Tracklog ▸ Load Tracklog and pick the .gpx file. The track is drawn on the map.
  3. Select the photos in the filmstrip and choose Map ▸ Tracklog ▸ Auto-Tag Selected Photos.
  4. The coordinates are now in the catalogue. To put them into the files, select the photos in the Library module and press ⌘S (Metadata ▸ Save Metadata to File). For proprietary RAW formats that writes an .xmp sidecar next to the RAW, not into it.

If the camera was on a different time zone from the track’s location, set it first with Map ▸ Tracklog ▸ Set Time Zone Offset. The offset is in hours and applies to everything selected. A camera clock that was a few minutes fast has no setting here; you would shift the capture times themselves (Metadata ▸ Edit Capture Time) and tag afterwards.

Good for: people whose photos live in Lightroom anyway. Limits: one offset for the whole selection, hours only, the module needs an internet connection, and the result is in the catalogue until you save it out.

Route 2: ExifTool (free, command line)

ExifTool geotags a whole folder with one command:

# match every photo in the folder to the track; the camera times are read as the mac's current zone
exiftool -geotag track.gpx /path/to/folder

# say which zone the camera clock was on (here two hours ahead of UTC)
exiftool -geotag track.gpx '-geotime<${DateTimeOriginal}+02:00' /path/to/folder

# the camera clock was 1 minute 20 seconds fast
exiftool -geotag track.gpx -geosync=-1:20 '-geotime<${DateTimeOriginal}+02:00' /path/to/folder

# several days of recordings at once
exiftool -geotag "tracks/*.gpx" '-geotime<${DateTimeOriginal}+02:00' /path/to/folder

It writes into the files directly, RAW formats included, and keeps a _original copy of each unless you add -overwrite_original. Photos taken more than half an hour from the nearest recorded point are left untagged, with a warning.

What it doesn’t do is show you anything. There is no map and no preview; you learn that the zone was wrong by opening a tagged photo afterwards and finding it in the next valley. Run it on a copy of three photos you can place from memory before you run it on the trip.

Route 3: Media Location Tagger (see the result first, then write)

Media Location Tagger is a location editor for photo and video files. Its GPS Tracks tab is built around one idea: every match is a proposal on a map until you apply it.

  1. Drop the photos on the window. The GPS column shows a grey “no data” icon for the camera files and a green tick for anything that already has coordinates, such as phone photos.
  2. Drop the .gpx file on the window, or choose GPS Tracks ▸ Load GPS Track… (⇧⌘T). The track is drawn on the map, and each photo gets a proposed position along it, shown as a translucent marker.
  3. Check where the photos land. Three views show the same match: the map; the file list, whose Match column says in words how each position was found (Interpolated between two recorded points, Nearest fix, In gap, Before track); and a time strip under the map with the recording as a bar and one row of photo ticks per camera. Hover over a tick to see the photo and its spot on the map.
  4. Apply. Select the photos and click Apply Track Positions. The markers turn solid and the coordinates are in the files. GPS Tracks ▸ Apply Track Positions to All Matched Items… writes every match at once.
  5. Add the place names. With coordinates in place, the app proposes a sub-location, city, state and country for each photo. Location ▸ Apply All Proposed IPTC Location Tags writes them.

Media Location Tagger's GPS Tracks tab: a day's drive through Texas drawn as an orange line on the map with the photos' proposed positions along it, the file list with a Match column reading Interpolated for all ten Leica files, the selected photos' thumbnails in the sidebar above an Apply Track Positions button, and the time strip at the bottom with the recording as a bar and one tick per photo

Ten camera files, one track: every position is a proposal until Apply Track Positions is clicked.

Photos that already have coordinates keep them: Apply fills in blanks only, and overwriting is a separate command (hold ⌥). That matters when phone photos and camera photos are in the same folder, and it gives you a free check: where you shot the same scene with both, the camera’s translucent marker should sit on the phone’s solid one.

When the photos land in the wrong place

The time strip is where you see it. If the photos miss the track by a whole number of hours, the strip says so and offers a Shift: the usual cause is a camera left on home time, and the shift corrects the camera’s zone.

If they are off by less, select one photo whose place you know, click Set Clock from Map… in the sidebar’s Cameras tab, and click the spot on the track where it was taken. The app works out the clock error from that one photo and moves all of that camera’s positions at once. A landmark you walked past is a better reference than a place where you sat for an hour.

The map zoomed in on downtown Brenham: a green pin marks the corner where the selected photo of a mural painter was taken, and the photo's proposed position sits two blocks further east along the track

Before: the camera clock was 4 minutes fast, so the photo is placed where I was 4 minutes later, two blocks from the mural (the green pin).

The same view after the correction: the photo's marker now sits on the green pin, the time strip shows the camera row moved 4 min 21 s earlier, and the status line reads Leica D-Lux 8 clock set 4 min 21 s fast, 10 positions moved

After: one reference photo corrected the clock, and all ten positions moved with it.

None of this rewrites the capture time in your photos. It changes how the photos are read for matching. The troubleshooting guide covers the causes one by one, for all three tools.

Two cameras, two clocks

Each camera gets its own clock and its own row on the time strip. The app tells cameras apart by make, model and serial number, so correcting the mirrorless body that was four minutes fast doesn’t move the compact that was right. A correction is remembered and offered again the next time that camera’s photos appear.

A whole trip

  • Load every day’s recording together. Drop a folder of .gpx files; each track gets its own colour. Where two recordings overlap in time, the one higher in the list wins, and you can drag to reorder.
  • Check the first day and the last. If the trip crossed a time zone or a daylight-saving change, the camera may or may not have been adjusted on the way. A clock change can be inserted at the photo where it happened, so that only the later photos move.
  • Gaps stay gaps. A photo taken while the logger was off, in a tunnel or out of battery gets no position, not a straight-line guess. Those photos are collected under Items Needing Review; drop a pin where they were taken and apply it to them.
  • Work through it in groups. The arrows in the sidebar step through the matched photos group by group: arrow, glance at the thumbnails, Apply.

The time strip with a hole in the recording bar and the note 3 items in a 1 h 44 min gap; in the file list one photo reads In gap and two read Nearest fix with the distance in minutes

The logger stopped for an hour and three quarters. The photos inside the hole are flagged, not guessed.

If you applied the wrong positions

Correct the clock or the track, and Update Track Positions rewrites what was already written. GPS Tracks ▸ Revert Track Positions and ⌘Z put the files back as they were.

Formats: JPEG, HEIC, TIFF, PNG, the current RAW formats (written in place, no sidecar), MOV and MP4. The app reads GPX tracks; it does not read FIT, TCX or KML files, and it does not work on files inside an Apple Photos library, so export the originals first. It runs on macOS 15 Sequoia or later, is US$29.95 / €29.95 as a one-time purchase, and has a free trial. The manual’s step-by-step page walks through the same workflow with the app’s own labels.

Which route?

  Lightroom Classic ExifTool Media Location Tagger
Cost subscription free US$29.95 once, free trial
Preview before writing on the map, into the catalogue none map, match column, time strip
Time zone one offset in hours per command per camera
Clock off by minutes edit capture times first -geosync click a known spot on the track
Several cameras one selection at a time one command per camera separate clock per camera
RAW files .xmp sidecar in the file in the file
Place names suggested, accepted one by one typed by hand proposed and applied in bulk

If the photos are in a Lightroom catalogue and the camera clock was right, stay in Lightroom. If you are comfortable in the Terminal and know your offsets, ExifTool is all you need. If you want to see where each photo will land before it is written, or the trip involved two cameras, a time zone and a logger that died on day three, that is what the third route is for.

Common pitfalls

  • Trusting the first run. Check one photo you can place from memory before you write a thousand.
  • A route instead of a track. No times, no matching. See “What you need”.
  • The camera was on home time. Every photo lands hours along the track from where it was taken, or nothing matches at all.
  • Daylight saving. Cameras don’t adjust themselves. A trip that spans the change has two offsets.
  • Tagging inside Apple Photos. Photos doesn’t read track files. Export unmodified originals, tag them, and re-import.
  • Tagging exports instead of originals. Tag the originals so that every later export carries the location.

FAQ

How do I geotag photos with a GPX file on a Mac? Load the photos and the GPX file into a tool that matches them by time: Lightroom Classic’s Map module, ExifTool’s -geotag option, or Media Location Tagger’s GPS Tracks tab. Tell it the camera’s time zone, check one photo you recognise, then write.

Can Apple Photos geotag from a GPX file? No. Photos assigns locations by hand, one selection at a time, and keeps them in its library.

Does Lightroom import GPX files? Lightroom Classic does, in the Map module (Map ▸ Tracklog ▸ Load Tracklog). The cloud-based Lightroom has no track matching.

How accurate is the result? As accurate as the recording and the clock. A phone or watch records a point every few seconds, and positions between points are interpolated. A camera clock that is one minute out puts a photo where you were one minute earlier or later: a few steps on foot, more than a kilometre on a motorway.

Do I need to set the camera clock exactly before a trip? It helps, but it isn’t required. Take one photo of your phone’s clock, or one photo at a spot you can find on the map, and the error can be worked out afterwards.

Can I geotag RAW files from a GPX track? Yes. ExifTool and Media Location Tagger write the coordinates into the RAW file; Lightroom writes a sidecar.

What if the tracker stopped recording for part of the day? Photos taken in the hole get no position from the track. Place them by hand with a pin, or leave them untagged.

Can I use a route I planned instead of a recording? Not for automatic matching, because it has no times. It still shows where you went, which helps when placing photos by hand.


Frank Reiff is the developer of Media Location Tagger, A Better Finder Attributes and A Better Finder Rename, Mac file-management utilities in continuous development since 1996. Related: Geotag photos on a Mac, What is geotagging?, Fix the wrong location on photos, or get in touch with a track that won’t match.