I've done this to strip Exif metadata from pictures using Automator. Uses homebrew and the exiftool package.
Workflow receives current "image files" in "any application"
Image = Action
Run shell script:
Shell: /bin/zsh
Pass input: As argument
for f in "$@"
do
/opt/homebrew/bin/exiftool -all= -tagsfromfile @ -ColorSpaceTags -Orientation $f
done
----Will be under the Quick Actions menu.
I tried the same with Shortcuts, but I cannot get it to run from the context menu, only within Shortcuts during testing. Maybe something limiting shell command access from Shortcuts? Not sure.