willnorris / imageproxy

A caching, resizing image proxy written in Go
Apache License 2.0
3.56k stars 484 forks source link

Is there any way to remove metadata from images #372

Open bigint opened 1 year ago

bigint commented 1 year ago

Is there any way to remove metadata like GPS location etc from an image?

willnorris commented 1 year ago

No, not currently. I believe the exif library I'm currently using (https://github.com/rwcarlsen/goexif) only supports decoding exif data. It looks like https://github.com/dsoprea/go-exif also supports encoding exif, but I'm not sure I love the idea of doing that. If the goal is location privacy, this isn't really going to do a lot, since imageproxy makes no effort to hide the URL of the source image, which would still contain the location data. If the goal is file size, how large is the location data compared to the image itself? I would guess it's just lat/lon coordinates, altitude, and a timestamp or something?