feoblog
feoblog copied to clipboard
Strip "Media Group UUID" exif from JPEG images
Scenario:
- User has an HEIC image on their phone.
- User attaches it to a post.
- Safari on iOS automatically converts the HEIC image to JPEG.
- Instead of re-using the "Media Group UUID" from the HEIC, it creates a new, random UUID.
If the user ever uploads the image again, it has different file contents, thus a different hash, and breaks content-addressable store. Leads to:
- needless duplication of images.
- inability to (re)attach an image at a later time if uploading goes wrong. (i.e.: #120)
Brainstorming:
Q: Should I just strip all exif data out of images?
A: No. If I'm working on a computer and I drag a file in, I may want the exif metadata to stay present. We shouldn't modify files without users' consent. (Though, we may want a separate feature to warn people about exif metadata. GPS in particular.)
… But Safari (only on iOS?) creating images w/ different UUIDs with every upload feels more like a bug. So maybe limit the stripping to
- Just that field (Maybe replacing it with all 0s)
- Only on iOS