EXIF feature - #441
Open
chunt007 wants to merge 6 commits into
Open
Conversation
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds client-side EXIF metadata stripping for profile photo uploads in the Heading edit dialog, aiming to prevent accidental disclosure of sensitive photo metadata (e.g., GPS coordinates) before the image is uploaded.
Changes:
- Add a new
stripExifCanvashelper that re-encodes certain image types via a canvas to drop EXIF metadata. - Apply EXIF stripping in the “Upload” flow of
HeadingEditDialog. - Update
package-lock.jsonwith multiple dependency/transitive version bumps.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/sections/heading/stripExifCanvas.ts | New helper to re-encode JPEG/WebP (and JPG) images via canvas to remove metadata. |
| src/sections/heading/HeadingEditDialog.ts | Integrates the EXIF-stripping helper into the profile photo upload UI flow. |
| package-lock.json | Large lockfile update with multiple dependency/transitive bumps alongside the feature change. |
Suppressed comments (1)
src/sections/heading/HeadingEditDialog.ts:691
- The camera-capture path currently bypasses EXIF stripping and uploads the raw captured file. Camera photos can contain EXIF (including GPS), so this undermines the privacy goal of the PR for profile pictures.
const handleCameraInput = async (event: InputEvent) => {
const file = (event.target as PhotoCapture).value
if (!file || !basicInfo) return
try {
formState.pendingImageFile = file
setHeadingImagePreview(formState, file)
basicInfo.status = basicInfo.entryNode ? 'modified' : 'new'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+664
to
+667
| const sanitizedFile = await stripExifCanvas(originalFile) | ||
|
|
||
| formState.pendingImageFile = sanitizedFile | ||
| setHeadingImagePreview(formState, sanitizedFile) |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After some training, I was given a heads up about this staging area repo. This is my exif data revision suggestion that only scrubs the image before it gets uploaded into the profile pane.
This scrubs EXIF data that you may not have intended to show people
GPS coordinates
camera type
instagram, facebook, and other platforms scrub your image exif by default.
However, some people will want to keep their exif data. But for the purpose of this profile picture, it should be scrubbed. Just incase someone impulsively forgets that they are oversharing personal details with photographs.
I will close the other pull request from #363.
etc.
For now, it is based on the profile picture.
It adds one new file to sections and revises editheadingdialogbox.