How to Geotag Photos from a GPX Track

Sync a GPX tracklog to your photos in Lightroom or ExifTool, handle the camera-clock offset that trips most people, and what to do when there's no track.

GPX geotagging works on a simple idea: a GPS logger records your position every few seconds as a track, software matches each photo's timestamp against the nearest track point, and interpolates coordinates for every frame in between. The result is standard EXIF GPS written into each file β€” and every map, photo manager, or gallery that reads EXIF will show the right location with no further work.

In practice two things trip people up: forgetting to start the logger before the shoot begins, and not accounting for the gap between the camera's clock and GPS time. Both are easy to handle once you know about them.

TL;DR: Record a GPX track on your phone (Gaia GPS, OsmAnd, or GPSLogger for Android) while you shoot. In Lightroom Classic: Map > Tracklog > Load Tracklog, optionally set a time offset, then Auto-Tag Selected Photos. With ExifTool: exiftool -geotag track.gpx /photos/, adding -geosync for any clock offset. No track at all β€” old trip, forgotten logger, crashed app β€” see the geotagging without GPS guide for the AI fallback.

Step 0: record and export the GPX

GPX (GPS Exchange Format) is a standard XML format that every logger exports and every geotagging tool accepts. You don't need a dedicated device β€” a phone app running quietly in the background is enough for most shoots.

  • iOS: Gaia GPS, Trails, and OsmAnd all export standard .gpx files.
  • Android: GPSLogger is purpose-built for background logging β€” it's lightweight, stays running across the full shoot, and produces clean GPX with low battery cost. Gaia GPS and OsmAnd are also reliable.
  • Dedicated GPS units: Garmin handhelds and sport watches export GPX via Garmin Connect or directly from the device's USB mass storage.

Start the logger before you take your first frame. A track that starts five minutes into the shoot leaves those early photos unmatched.

The clock-sync problem

GPX track points are timestamped in UTC. Your camera's DateTimeOriginal is almost certainly in local time β€” or in UTC but drifted by some number of seconds over time. Without accounting for this gap, the timestamp matching will either fail entirely or place photos in the wrong location.

The reliable fix is to photograph your GPS unit's time display (or a GPS-synced clock app on your phone) at the start of the shoot. After downloading, open that reference photo's EXIF DateTimeOriginal and compare it to the UTC time shown on screen. The difference, in seconds or HH:MM:SS, is the offset you'll feed to Lightroom or ExifTool below.

A 30-second drift moves a walking-pace subject roughly 50 meters along the track β€” visible on a map. It's worth measuring.

Method 1 β€” Lightroom Classic Map module

Lightroom Classic has first-class GPX support built directly into the Map module. It shows the matched track on screen before you commit, handles the time-zone offset interactively, and writes coordinates back to the original files through the standard Save Metadata command.

  1. Switch to the Map module in Lightroom Classic.
  2. Choose Map > Tracklog > Load Tracklog and select your .gpx file. The track appears as a colored line on the map.
  3. If your camera clock was off, choose Map > Tracklog > Set Tracklog Time Offset before the next step. Enter the offset in HH:mm format β€” for example, +02:00 if your camera was two hours behind UTC.
  4. In the filmstrip, select the photos whose capture times fall within the track's time range.
  5. Choose Map > Tracklog > Auto-Tag Selected Photos. Lightroom interpolates each photo's position between the nearest two track points and drops a pin on the map.
  6. Review the pins. If any photo landed on the wrong road or in the wrong city, you can drag it manually. When everything looks right, run Metadata > Save Metadata to Files (⌘S / Ctrl+S) to write the GPS coordinates from the catalog into the actual image files.

This is the natural path if Lightroom Classic is already your editing workflow. The map preview before committing is valuable β€” mismatched photos show up visually rather than silently.

Method 2 β€” ExifTool, for any software stack

ExifTool works independently of any photo manager. It reads the GPX file, reads DateTimeOriginal from each image, finds the nearest track point in time, and writes the standard GPS EXIF tags in place. Because it's command-line, it works on any operating system and is scriptable across any directory structure.

Basic command β€” process an entire folder:

exiftool -geotag track.gpx /path/to/photos/

If the camera clock was off, add -geosync with the offset. Positive means the camera was behind GPS time (common when the camera was on local time and GPS is UTC):

exiftool -geosync=+02:00:00 -geotag track.gpx /path/to/photos/

To process multiple GPX files at once β€” useful for multi-day trips with one file per day:

exiftool -geotag "day1.gpx" -geotag "day2.gpx" /path/to/photos/

Verify a single photo after tagging:

exiftool -GPS:all photo.jpg

You should see GPS Latitude, GPS Longitude, GPS Latitude Ref, and GPS Longitude Ref with values that match the route.

If ExifTool reports Warning: No GPS track points found in time range, the timestamps don't overlap β€” almost always the UTC-vs-local-time gap described above. Add -v2 to print verbose matching output showing exactly which timestamps are being compared and where the gap falls. ExifTool backs up originals by default (suffixed _original); once you've verified a sample, rerun with -overwrite_original to skip the backups.

Method 3 β€” Other tools

A few alternatives worth knowing about:

  • digiKam (free, cross-platform) β€” open source photo manager with a GPX correlation panel and an interactive time-offset slider. Good option if you want the map-preview workflow without a Creative Cloud subscription.
  • HoudahGeo (macOS, paid) β€” dedicated geotagging tool with Lightroom integration and support for mixing multiple GPS sources and correcting per-camera clock drift across a group shoot.
  • gpscorrelate (Linux, free CLI) β€” minimal, focused on GPX-to-EXIF correlation with no photo management layer on top.

For most photographers, Lightroom or ExifTool covers the job. The others matter when the situation is more complex: multiple cameras with independent clock drift, GPS tracks from several sources, or a Linux-only pipeline.

What if there's no track at all?

The GPX method only works if a track was recorded. That handles every future shoot once you build the habit. It doesn't help for:

  • Old trips where you weren't logging GPS
  • Camera rolls from a borrowed or secondhand camera
  • Sessions where the phone died or the app crashed before you exported

For those photos, there are no timestamps to correlate against. Two fallbacks:

Manual pin. If you remember roughly where you were, drop a pin in Lightroom's Map module or any EXIF editor. This works for "I know it was central Tokyo, near the Senso-ji" β€” not for "I have no idea."

AI inference. RetroTagr analyzes each photo's visual content β€” recognizable landmarks, architectural style, vegetation, terrain, road markings β€” and proposes a likely location. You review the suggestion on a map and confirm or adjust it before any GPS is written to the file. It's the specific tool for the case where there's genuinely no location information to start from. The geotagging photos without GPS guide covers the full workflow.

RetroTagr does not do GPX track correlation β€” it owns the gap the track-sync method can't reach.

Which method should you use?

SituationBest fit
Lightroom Classic is already your editing appMethod 1 β€” Load Tracklog in the Map module
Not using Lightroom, or need to script itMethod 2 β€” ExifTool -geotag
Multi-day trip, one GPX file per dayExifTool with stacked -geotag flags
Camera clock was significantly offEither method with time offset / -geosync
No track recorded; remember where you wereManual pin in Lightroom or an EXIF editor
No track recorded; location unknownAI inference β€” see the without-GPS guide

Wrap-up

GPX geotagging is the highest-accuracy approach when you have the data: every photo gets an interpolated coordinate typically within a few meters of the real position. The two steps that most often break a first attempt β€” starting the logger before frame one, and correcting the camera-clock offset β€” become a natural part of the pre-shoot routine after the first time.

The hard limit is when no track exists. No software can correlate against data that was never recorded. Manual pinning covers what you remember; AI inference from visual content covers what you don't. The without-GPS guide handles that path in detail, and if you're weighing Lightroom's built-in map tools against a dedicated web workflow, the RetroTagr vs Lightroom comparison lays out where each one fits best.

Frequently asked questions

Related guides

Start tagging your photos

Try the AI geotagger free for the first 5 photos.

Get started
How to Geotag Photos from a GPX Track