Strip Your Geotags, People!

It never ceases to amaze me how information-leaky our smartphone cameras are.

Even after editing pictures, it’s a good idea to strip metadata from uploaded images, especially if they show where you live down to a city block.

Maybe GPS tags should be opt-in rather than opt-out.

This image of my chicken dinner had my home address in it, not really what I want to share.

In this case, GPS location metadata made it through GIMP using the default Export options, which will preserve all of the incoming metadata and pass it through.

This includes the following fields:

Use exiv2 or something similar to remove these tags when pushing images to production, it’s actually stupidly easy.

The commands exiv2 rm *.jpg and exiv2 rm *.png — are pretty much all you need to know to remove all metadata from all of these files in one folder at once.

Doublecheck with exiv2 -pa pr *.jpg:

All clean.

If you’re using GIMP to edit pictures and export them out to JPEG or PNG, make sure to uncheck the Save (EXIF, XMP) data fields when exporting, unless you’re sure you need them.

You’re good to go.

Update: Here’s a script to do this for you for all images recursively in a folder, as well as add Creator + Copyright data and a hash to the image in case you’re interested in seeing where it might get reposted.

And a sample exiv2 command file:

One thought on “Strip Your Geotags, People!”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.