BasicSec.org

IntroductionContentsReviewsToolsUpdatesPurchaseContact
Home / Practical guides

Photo metadata: five checks before a community upload

Published 2026-11-15 · · Reproducible teaching exercise

1. Separate the file review from the picture review

A picture can carry text that is not drawn into its pixels. Before a community upload, separate two reviews: what someone can see in the picture, and what the file contains besides its image data.

The small-group account and backup guide helps establish who is authorized to handle a file. This exercise adds a small local demonstration using invented information. It does not inspect anyone's photographs or certify a file as anonymous.

2. Compare two files with the same image data

The companion metadata-fixture/inspect_demo.py uses Python's standard library to generate two four-by-four RGB PNG files. Both use the same compressed image data. One also contains two deliberately fictional text entries:

FieldInvented value
AuthorExample workshop
DescriptionSynthetic fixture, not a camera photo

The W3C PNG specification describes text chunks including tEXt, iTXt and zTXt. This demonstration inspects only its own tEXt entries. A PNG exercise is not an EXIF, JPEG or phone-camera inspection procedure.

Run the companion script from its saved location with Python 3. It writes synthetic-tagged.png and synthetic-without-text.png beside itself, then prints a JSON result. It does not upload either file. Use a separate exercise directory; do not replace the filenames with private photographs.

Our executed result found both invented entries in the tagged fixture and no tEXt entries in the second fixture. The compressed pixel data matched, and the tagged file's digest remained unchanged after inspection. A separate PNG decoder also verified the generated images are four-by-four pixels; these are small teaching fixtures, not camera photographs. These checks concern the generated files only, not a real camera image or a sharing platform.

3. Record what the check covered

Review questionWhat to write down
Which file was inspected?Its filename and an identifier such as a digest; keep the original separately
Which tool and scope?Tool/version and metadata families it actually examines
What was observed?Fields found, fields intentionally retained, and unresolved items
What can still identify someone?Visible faces, badges, screens, landmarks, captions and filenames need their own review
Is sharing authorized?Record the decision through the group's normal process; a metadata check supplies no permission

4. Keep the limits with the result

Finding no fields in one metadata family does not establish that all identifying information is absent. This script does not inspect EXIF, XMP, iTXt, zTXt, video tracks, platform-generated previews or visible image content. It is not a general file sanitizer or a safe-upload guarantee.

For a real upload, use a trusted local tool appropriate to the actual file format and inspect a separate sharing copy. If the tool's coverage is unclear, keep that uncertainty in the record instead of labelling the file “clean.” A later platform check would also need to distinguish the original upload from any downloaded derivative; none was performed here.

Next, use the backup restore-test worksheet to connect the sharing decision with authorized access and preservation of the original.

5. Repeat the small exercise

Download the readable Python demonstration, the tagged PNG, the PNG without text entries and the recorded demonstration result. Save the code as inspect_demo.py in a separate exercise directory and read it before running python3 inspect_demo.py. It accepts no private-photo arguments. The published version refuses to replace a file whose bytes differ from the generated fixture. This is a limited inspection exercise, not a sanitization tool.

IntroductionContentsReviewsToolsUpdatesPurchaseContact
Analytics privacy