Image files can carry embedded GPS coordinates in their EXIF metadata — but whether a specific file actually has that data depends on the device, the settings, and any processing the file has gone through.
One important nuance for developers: a photo app showing a location on a map does not mean the file has embedded EXIF GPS. Google Photos, for example, can display locations from the camera's EXIF data, from user-added location info, or from Google's own location estimation. If your system depends on actual embedded GPS coordinates, you need to inspect the file's EXIF fields directly.
The EXIF GPS Fields
The relevant fields in EXIF metadata are:
GPSLatitude: 48 deg 51' 24.00" N
GPSLongitude: 2 deg 21' 7.00" E
GPSAltitude: 35.2 m
GPSDateStamp: 2026:09:15
GPSTimeStamp: 14:30:22
If GPSLatitude and GPSLongitude are present and populated in the file, the image is geotagged. These coordinates are recorded by the device's location services (GPS, Wi-Fi, cellular, or a combination) at capture time.
File format considerations: Metadata support and what your operating system or library can read varies by file format and application. JPEG and TIFF have well-established EXIF support. HEIC/HEIF (default on iPhone) supports it. Other formats vary. If a built-in file inspector does not show GPS fields, use a dedicated metadata viewer or ExifTool before concluding that no location data exists.
OS-Level Checks
Windows: Right-click → Properties → Details → GPS section. Shows DMS-format coordinates if embedded.
macOS Preview: Tools → Show Location Info. If greyed out, Preview does not detect location data in the file.
macOS Terminal with ExifTool:
# Check specific GPS fields
exiftool -GPSLatitude -GPSLongitude image.jpg
# Check all GPS-related fields
exiftool -GPS:all image.jpg
# Batch check a directory
exiftool -GPSLatitude -GPSLongitude -r ./photos/
iPhone/Android built-in apps: Show a location associated with the photo, but this is not always proof of embedded EXIF GPS. Google Photos may display camera-recorded, user-added, or app-estimated locations. For file-level confirmation, inspect with a metadata viewer or ExifTool.
Browser-Based Checking
For quick file-level checks without installing anything, the GeoImageTagger Metadata Viewer processes images locally in the browser (no server upload) and displays all EXIF fields including GPS. This is the most reliable way to confirm embedded GPS — it reads the actual file, not app-level metadata associations.
Why GPS Data Disappears
Understanding when GPS data gets stripped or is absent matters if you are building systems that depend on it:
Platform processing. Many social media platforms and messaging apps may remove or alter metadata during upload, compression, or sharing. Behavior varies by platform, sharing mode, device, and app version. Do not hardcode assumptions about which platforms strip metadata — if your pipeline depends on GPS data surviving a transfer, verify the actual received file.
Image processing pipelines. Many image optimization tools, CDNs, and format converters strip or modify EXIF data. If you are running images through a pipeline (resize, compress, convert), check whether your tools preserve EXIF:
# ImageMagick strips EXIF by default on some operations
convert input.jpg -resize 800x600 output.jpg # May lose EXIF
# Use -strip explicitly if you want to remove it
convert input.jpg -strip output.jpg
# Preserve EXIF during resize
convert input.jpg -resize 800x600 -profile input.jpg output.jpg
Screenshots. Screenshots capture screen pixels, not camera sensor output, so they never have EXIF GPS data.
Programmatic Checking
For batch processing or integration into pipelines:
Python (Pillow):
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def check_gps(filepath):
img = Image.open(filepath)
exif = img._getexif()
if not exif:
return None
for tag_id, value in exif.items():
if TAGS.get(tag_id) == 'GPSInfo':
gps = {}
for k, v in value.items():
gps[GPSTAGS.get(k, k)] = v
return gps
return None
Node.js (exif-reader or sharp):
const sharp = require('sharp');
async function checkGPS(filepath) {
const metadata = await sharp(filepath).metadata();
if (metadata.exif) {
const exifReader = require('exif-reader');
const exif = exifReader(metadata.exif);
return exif?.GPS || null;
}
return null;
}
What to Do With the Result
If GPS exists and should be removed for privacy, strip it before serving. The GeoImageTagger EXIF Remover handles this in-browser for manual workflows.
If GPS is missing and needs to be added (for SEO geotagging, asset management), the GeoImageTagger Metadata Editor writes coordinates directly into the file.
If GPS is missing and you need to estimate location from visual content, the AI Location Finder uses visual AI analysis — useful as a starting point but not a substitute for actual embedded GPS data.
For the full guide: How to Check If a Photo Is Geotagged.
Top comments (0)