on-internet
← Community

How can I strip EXIF metadata from user-uploaded selfies before showing them back in a browser-based web app?

Stack Overflow ·

I run a small personal-style web app (https://stylelooklab.com/) where users upload selfies for color analysis and hairstyle previews. The photos are processed in the browser and then shown back to the user. I'm concerned about EXIF metadata (GPS location, camera model, timestamps) travelling with those uploads. What is a reliable way to strip EXIF data client-side in JavaScript before the image is used or displayed? I've looked at drawing the image to a canvas and re-exporting it with toBlob, which seems to drop metadata, but I'd like to know: whether canvas re-encoding reliably removes all E

Comments

Sign in or sign up to comment and upvote.

No comments yet.