tutorial / Nov 29, 2026

Check a JPEG From Your Homelab Before Sharing It

Keep the geotagged original on your home server. Make a separate JPEG for sharing, then check what the recipient can actually see.

By Stackarr Editorialhomelab · self-hosting · ExifTool · photo libraries
Archive master, local working copy and reviewed export shown in order.
Only the reviewed export belongs in the outgoing message.

Keep the map at home

A homelab photo library can answer two different questions: where was this picture taken, and what should a relative see when you send it? The coordinates that put a first-day-of-school picture on your private map are precisely what you might not want in an email attachment. Changing the archive master to solve a sharing problem costs you a useful record. Instead, make a disposable export and give that file its own release check.

This guide removes the standard EXIF GPS group from one JPEG. It is not a promise of anonymity. A street sign, a school badge or a caption can identify a place without any coordinates. Nor does this change a location already stored in a self-hosted gallery's database. The object being checked is the outgoing file, not the application's map pin.

Prerequisites

Use a local account on macOS or Linux with ExifTool installed. Run exiftool -ver; a version number means the command is available. If the shell says command not found, stop here. Use your system's normal package source before continuing. Choose a plain JPEG, not a RAW capture, a Live Photo pair or a renamed HEIC. A motion companion is a separate file and would need its own review.

Mount the NAS photo share read-only if possible. If your gallery runs in Docker, work on the client, outside the bind mount the container watches for new photos. A temporary original appearing there can become a permanent second library item. Check your backup job's include list too: a disposable export directory need not become another archive. The commands below assume your home directory is private and not synced. If it is synced, use a private local directory instead. No step needs administrator rights.

Setup

  1. Run mkdir -m 700 ~/jpeg-share-check to create a fresh directory. If it already exists, stop rather than reusing somebody else's export or yesterday's result. With your file manager, copy one photo into it as input.jpg. Copy, do not move, and do not use a link to the master.
  2. Run cd ~/jpeg-share-check and confirm pwd ends in the new directory. Run exiftool -FileType -G1 -a -s input.jpg. Continue only if FileType is JPEG. The extension alone is not a format check.
  3. Read the baseline with exiftool -G1 -a -s input.jpg. Look for latitude and longitude, but also read captions, keywords and location names. Group labels tell you where a value resides; the same place can be recorded in multiple groups. Treat this output as private and do not paste it into a public support thread.
  4. Run exiftool -o share.jpg -GPS:all= input.jpg. The named output keeps the input separate. If the destination exists, do not force an overwrite. Start with a fresh directory instead. A report that a file was created means there is a candidate to inspect, not that it is safe to send.
Comparison of GPS coordinates, descriptive text and identifying details in the image itself.
A missing GPS group answers only one of three location questions.

Verification

Run exiftool -G1 -a -s -GPS:all share.jpg. With no warning or error, no GPS fields printed is the expected narrow result. Compare this with the same query on input.jpg. If neither file has a GPS group, the comparison does not demonstrate that coordinates were removed; the input may simply never have contained that group. The GPS tag reference explains the separate coordinate and direction fields.

Now run exiftool -G1 -a -s share.jpg without the filter. Read the descriptive fields and any remaining location data, including XMP. The ExifTool FAQ explains the group and tag-name switches. Open the candidate itself in a viewer; zoom in on signs, reflections and badges. A photo that fails either check stays private.

Inspect metadata, open the export and select the exact file.
Verify the same file that will be attached, not the item shown in the library.

Troubleshooting

A gallery map may still show the original location even after the output passes the narrow test. First check which item the gallery is showing. Do not rebuild the index or clear the archive's coordinates: neither action tells you what is embedded in the attachment. If a descriptive field in the candidate names the location, withhold the file and make a different export; repeating the GPS command cannot remove a caption.

If ExifTool reports an unreadable file, an output collision or an unexpected warning, stop. Do not interpret a blank result alongside an error as a pass. Check the filename and actual file type against the application documentation. Avoid changing the command to target a directory; the narrow filename is what keeps a one-photo task from becoming a library edit.

Recovery and rollback

To roll back, leave the archive alone and discard the working files through your file manager after confirming their enclosing directory. The private master retains its location, so the next attempt can start from a fresh copy. If sending is appropriate, attach only share.jpg from the reviewed directory, not a gallery link, folder archive or metadata sidecar. Check the attachment name before sending. If the wrong attachment has already gone out, removing the local copy cannot recall it; contact the recipient rather than treating local cleanup as recovery.

Verification ledger

Sources and further reading

  1. exiftool Application DocumentationExifTool · Primary source
  2. GPS TagsExifTool · Primary source
  3. ExifTool FAQExifTool · Primary source