Remove GPS Tags After Taking a Photo
Sometimes I’ll turn location data on in my phone’s camera app for a specific trip. And sometimes I’ll forget to turn it off when I’m done. And sometimes, I’ll take some photos that I want to share, but I don’t want to share precise coordinates.
Annoyingly, Google Photos doesn’t let you remove GPS data from an image. You can hide it, but the geotag is still in the file.
I haven’t found an Android app that will just remove GPS info. All EXIF info, yes. And FiXato pointed me to ImagePipe, which lets you remove selected tags while resizing the image, but as near as I can tell, it always resamples the image.
But usually I want to keep at least the timestamps, and while it’s one thing to drop image quality when posting to Pixelfed or Twitter or Mastodon or some site that’s going to resize it anyway, sometimes I want to preserve the original image quality.
Fortunately it’s pretty easy to do on a desktop or laptop – without even adding any software! The hard part is knowing where to look.
Windows 10: File Properties
- Right-click on the file and open Properties
- Go to the Details tab.
- Click on “Remove Properties and Personal Information.”
- Choose “Remove the following…” and check the boxes for the GPS fields.
- Click OK to save the modified file.
MacOS: Preview
- Open the image in Preview.
- Look at its metadata.
- Delete the GPS section.
- Save the file.
Linux: Exiftool
This command line tool is almost guaranteed to be available no matter what distro you’re running. From this post on the exiftool forums:
exiftool -gps:all= FILENAMES
That will remove the entire GPS section from the EXIF data. Note that the equals sign does not connect to the filename(s)!
The same forum post also mentions that GPS info can be stored in XMP data, which can still be cleared out, but matching the XMP GPS tags is slower:
exiftool "-gps*=" FILENAMES
The second command will take care of both types of location tagging, but if you have a lot of files and you know they’re not using XMP, you might want to use the faster one.