From 4c0c8b6678247bc53c0c99f275bf232c832e2a14 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Mon, 19 Feb 2024 15:53:56 -0500 Subject: [PATCH] privacy: always strip GPS data from images Images selected from the photo library will automatically have their gps data stripped regardless of whether the user toggles the 'Location' button in the system level photo library view. Changelog-Changed: Always strip GPS data from images Closes: https://github.com/damus-io/damus/issues/1990 Lightning-address: kernelkind@getalby.com Signed-off-by: kernelkind Signed-off-by: William Casarin --- damus/Views/ImagePicker.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/damus/Views/ImagePicker.swift b/damus/Views/ImagePicker.swift index 9a38ee43..7353a420 100644 --- a/damus/Views/ImagePicker.swift +++ b/damus/Views/ImagePicker.swift @@ -36,7 +36,8 @@ struct ImagePicker: UIViewControllerRepresentable { guard let image = image as? UIImage, error == nil else { return } let fixedImage = image.fixOrientation() - if let savedURL = self.saveImageToTemporaryFolder(image: fixedImage) { + if let savedURL = self.saveImageToTemporaryFolder(image: fixedImage), + removeGPSDataFromImage(fromImageURL: savedURL) { self.parent.onMediaPicked(.image(savedURL)) self.parent.image_upload_confirm = true }