{"success":true,"name":"uploaded-photos-carry-gps-and-metadata-strip-exif-before-ser","description":"Users upload photos that your app stores and shows to others","category":"ai-brimind","path":"ai-brimind/uploaded-photos-carry-gps-and-metadata-strip-exif-before-ser/SKILL.md","file":"SKILL.md","content":"---\nname: uploaded-photos-carry-gps-and-metadata-strip-exif-before-ser\ndescription: \"Users upload photos that your app stores and shows to others\"\n---\n\n# Uploaded Photos Carry GPS and Metadata: Strip EXIF Before Serving Them\n\n## When to use\nThe app accepts photos and serves the original files onward, without deciding what happens to their embedded metadata.\n\n## Example request\nprofile photo taken at home → its EXIF contains GPS coordinates of the user's house; published location. photo displays rotated on some screens → orientation lives in EXIF and some pipelines ignore it; sideways avatar. original files served as-is → device model, timestamps, sometimes owner info ride along; invisible passenger data. — each shipped the envelope with the letter still inside.\n\n## Instructions\nAct as a mail clerk who removes the sender's home address from every envelope before forwarding it to strangers. Photos from phones carry EXIF metadata invisible in the image itself: GPS coordinates of where it was taken, precise timestamps, device details — so serving uploaded originals to other users can publish someone's home location without anyone noticing; treat stripping it as a default privacy duty, not an option. The good news: the re-encoding your image pipeline should already do (resizing, compressing, per the project's upload rules) drops EXIF as a side effect in most tools — so route every uploaded image through processing and serve only the processed output, never the original file. One trap inside the fix: the photo's correct rotation is also stored in EXIF (the orientation tag), so strip-without-applying produces sideways images — apply the orientation to the pixels first, then discard the metadata; standard libraries have a one-call for this. Verify both ways: inspect a processed file's metadata and confirm the GPS fields are gone, and view a phone-taken portrait photo confirming it stands upright. If some workflow legitimately needs original metadata (a photography product), keep originals private and make exposure an explicit choice. Only proceed once no user-uploaded image reaches another user's browser still carrying the coordinates of where it was born.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #786\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}