Signed-off-by: kimg45 <138676274+kimg45@users.noreply.github.com> Signed-off-by: blacklight447 <niek@privacyguides.org> Signed-off-by: redoomed1 <161974310+redoomed1@users.noreply.github.com>
6.4 KiB
date | categories | authors | links | tags | license | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
BY-SA |
Removing Metadata From Your Photos, Videos, and Other Files
When sharing files, it's important to remove associated metadata. Image files commonly include Exif data, and sometimes photos even include GPS coordinates within its metadata.
While there are plenty of metadata removal tools, they typically aren't convenient to use. The guides featured here aim to detail how to integrate metadata removal tools in a simple fashion by utilizing easy-to-access system features.
macOS
This guide uses the Shortcuts app to add an ExifTool script to the Quick Actions context menu within Finder. Shortcuts is developed by Apple and bundled in with macOS by default.
Shortcuts is quite intuitive to work with, so if you don't like the behavior demoed here then experiment with your own solution. For example, you could set the shortcut to take a clipboard input instead. The sky's the limit.
Prerequisites
-
Homebrew: a package manager.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
ExifTool is a tool for viewing and manipulating image, audio, video, and PDF metadata.
brew install exiftool
!!! note
You can check if ExifTool is installed by running exiftool -ver
. You should see a version number.
Creating the Shortcut
-
Open Shortcuts.app and create a new shortcut
-
In the shortcut's options, check Use as Quick Action and Finder
-
Set up the retrieval options:
- Receive Images, Media, and PDFs input from Quick Actions
- If there is no input select Continue
-
Add the Run Shell Script action to the shortcut. You may need to enable Allow Running Scripts in Shortcut.app's settings
-
Set up the shell script action:
- Select zsh from the shell list
- Set the input to Shortcut Input
- Select as arguments for the pass input
- Leave Run as administrator unchecked
-
Use the following as the body of the script:
for f in "$@" do exiftool -all= "$f"; done
!!! tip "Worth Mentioning" The open-source ImageOptim app integrates into Finder's Services context menu by default. While it is primarily an image optimization app, it also removes metadata.
Enabling & using the Shortcut
-
The shortcut will be accessible through Quick Actions context menu within Finder.
-
If you want to reposition the shortcut within the context menu, go to:
System Preferences → Extensions → Finder and drag the shortcut's position.
iOS and iPadOS
Shortcuts can be made accessible through the system Share Sheet, making accessing those shortcuts very convenient. This guide will show you how to build a metadata removal shortcut and integrate it into the system Share Sheet.
!!! warning This method of metadata removal is not as comprehensive at removing metadata as utilities like ExifTool and mat2 are.
The lack of good metadata removal apps on the App Store is what makes this solution worthwhile.
Prerequisites
- Shortcuts via the App Store.
Creating the Shortcut
-
Create a new Shortcut
-
Enter the Shortcut's settings and check Show in Share Sheet
-
Add a Receive action and set it to receive Images from Share Sheet
-
Add an If action
-
Set the If action to Shortcut Input and has any value
-
Add an Otherwise action
-
Add an End If action
-
Add a Convert action and set it to If Result and Match Input
-
Finally, add a Share action and set that to Converted Image
-
Make sure that you uncheck preserve metadata
Enabling & using the Shortcut
- The shortcut should be available through the system Share Sheet. If it is not, then a device restart may be required.
- Optionally, you can add the shortcut to your home screen.
Windows
Windows allows you to place files in a SendTo folder which then appear in the Send to context menu. This guide will show you how to add an ExifTool batch script to this menu.
Prerequisites
- ExifTool is a tool for viewing and manipulating image, audio, video, and PDF metadata. We suggest you read the Installation instructions on the official website.
!!! note
You can check if ExifTool is present in your PATH by running exiftool -ver
in Command Prompt. You should see a version number.
Creating the shortcut
-
Navigate to
%appdata%\Microsoft\Windows\SendTo
-
Right click in the SendTo folder and create a new Text Document
-
Name the file
ExifTool.bat
(any name works, however it must end in.bat
)!!! note You may need to check if file name extensions are enabled.
-
Open ExifTool.bat in Notepad
-
Copy the following into the document:
exiftool -fast4 -if "$filepermissions =~ /^.w/" %* if not errorlevel 0 ( echo Some files are write protected exit /b %errorlevel% ) exiftool -all= %*
-
Save
Using the shortcut
- Right click a supported file and choose ExifTool.bat within the Send to context menu.