How do I protect GPS location metadata from leaking?

I maintain a website where users can upload profile photos. Unfortunately, many users don’t realise that many photos contain GPS location metadata (EXIF data in JPG). I would like to strip out all the private EXIF metadata, in particular GPS location metadata, before serving it to any visitors. I don’t want to strip out EXIF orientation metadata, so that the photo remains the right way up.

I tried using Cloudflare Polish for this. It does remove image metadata. However, it only does this when serving the image from the cache. If the image is not in the cache yet, then the original image is served, with the GPS location metadata.

How can I make sure that the GPS location metadata is never leaked?

Do that on the server when saving the images, don’t do it on the fly each time.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.