Merge pull request 'Uploads: replace exiftool with the built-in exif_stripper' (#8028) from lambadalambda/pleroma:feature/exif-stripper into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8028
This commit is contained in:
lain 2026-10-31 07:48:00 +00:00
commit 3e9dc477c9
44 changed files with 518 additions and 381 deletions

View file

@ -37,8 +37,8 @@ If any of the options are left unspecified, you will be prompted interactively.
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
- `--strip-uploads-location <Y|N>` - use ExifTool to strip uploads of sensitive location data
- `--read-uploads-description <Y|N>` - use ExifTool to read image descriptions from uploads
- `--strip-uploads-location <Y|N>` - strip sensitive location data from uploaded images
- `--read-uploads-description <Y|N>` - read image descriptions from upload metadata
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
- `--skip-release-env` - skip generation the release environment file

View file

@ -705,15 +705,19 @@ This filter replaces the filename (not the path) of an upload. For complete obfu
No specific configuration.
#### Pleroma.Upload.Filter.Exiftool.StripLocation
#### Pleroma.Upload.Filter.Exif.StripLocation
This filter only strips the GPS and location metadata with Exiftool leaving color profiles and attributes intact.
This filter strips GPS and location metadata from JPEG, WebP, HEIC, AVIF and TIFF images, leaving color profiles and attributes intact. For PNG images it removes all text and EXIF metadata chunks. Images are not re-encoded, and other formats are left unchanged.
It replaces the deprecated `Pleroma.Upload.Filter.Exiftool.StripLocation`, which no longer needs exiftool.
No specific configuration.
#### Pleroma.Upload.Filter.Exiftool.ReadDescription
#### Pleroma.Upload.Filter.Exif.ReadDescription
This filter reads the ImageDescription and iptc:Caption-Abstract fields with Exiftool so clients can prefill the media description field.
This filter reads the ImageDescription and iptc:Caption-Abstract fields so clients can prefill the media description field.
It replaces the deprecated `Pleroma.Upload.Filter.Exiftool.ReadDescription`, which no longer needs exiftool.
No specific configuration.

View file

@ -68,7 +68,7 @@ sudo rc-update add postgresql
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
```shell
sudo apk add ffmpeg imagemagick exiftool
sudo apk add ffmpeg imagemagick
```
### Install PleromaBE

View file

@ -36,7 +36,7 @@ sudo apt install elixir erlang-dev erlang-nox
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
sudo apt install imagemagick ffmpeg
```
### Install PleromaBE

View file

@ -28,7 +28,6 @@ Note: This article is potentially outdated because at this time we may not have
- `certbot` (または何らかのLet's Encrypt向けACMEクライアント)
- `ImageMagick`
- `ffmpeg`
- `exiftool`
### システムを準備する
@ -60,7 +59,7 @@ sudo apt install elixir erlang-dev erlang-nox
### オプションパッケージ: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
sudo apt install imagemagick ffmpeg
```
### Pleroma BE (バックエンド) をインストールします

View file

@ -31,7 +31,7 @@ Setup the required services to automatically start at boot, using `sysrc(8)`.
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
```shell
# pkg install imagemagick ffmpeg p5-Image-ExifTool vips
# pkg install imagemagick ffmpeg vips
```
## Configuring Pleroma

View file

@ -12,7 +12,6 @@
* ImageMagick
* FFmpeg
* exiftool
!!!info
**Source installs only**

View file

@ -41,7 +41,6 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
* `app-crypt/certbot-nginx` (nginx certbot plugin that allows use of the all-powerful `--nginx` flag on certbot)
* `media-gfx/imagemagick`
* `media-video/ffmpeg`
* `media-libs/exiftool`
### Prepare the system
@ -97,7 +96,7 @@ Not only does this make it much easier to deploy changes you make, as you can co
### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
```shell
# emerge --ask media-video/ffmpeg media-gfx/imagemagick media-libs/exiftool
# emerge --ask media-video/ffmpeg media-gfx/imagemagick
```
### Install PleromaBE

View file

@ -25,7 +25,6 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
* `app-crypt/certbot-nginx` (nginx certbot plugin that allows use of the all-powerful `--nginx` flag on certbot)
* `media-gfx/imagemagick`
* `media-video/ffmpeg`
* `media-libs/exiftool`
### Prepare the system
@ -68,7 +67,7 @@ The output from emerging postgresql should give you a command for initializing t
See [Optional software packages needed for specific functionality](optional/media_graphics_packages.md) for details.
```shell
# emerge --ask media-video/ffmpeg media-gfx/imagemagick media-libs/exiftool
# emerge --ask media-video/ffmpeg media-gfx/imagemagick
```
### Setup PleromaBE

View file

@ -26,12 +26,11 @@ Independently of the reverse proxy, [acme-client(1)](https://man.openbsd.org/acm
* ImageMagick
* ffmpeg
* exiftool
To install the above:
```
# pkg_add ImageMagick ffmpeg p5-Image-ExifTool
# pkg_add ImageMagick ffmpeg
```
For more information read [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):

View file

@ -25,11 +25,10 @@ Asenna tarvittava ohjelmisto:
[`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):
* ImageMagick
* ffmpeg
* exiftool
Asenna tarvittava ohjelmisto:
`# pkg_add ImageMagick ffmpeg p5-Image-ExifTool`
`# pkg_add ImageMagick ffmpeg`
Luo postgresql-tietokanta:

View file

@ -2,9 +2,8 @@
For specific Pleroma functionality (which is disabled by default) some or all of the below packages are required:
* `ImageMagic`
* `ImageMagick`
* `ffmpeg`
* `exiftool`
Please refer to documentation in `docs/installation` on how to install them on specific OS.
@ -26,12 +25,3 @@ It is required for the following Pleroma features:
It is required for the following Pleroma features:
* Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`)
## `exiftool`
`exiftool` is media files metadata reader/writer.
It is required for the following Pleroma features:
* `Pleroma.Upload.Filters.Exiftool.StripLocation` upload filter (related config: `Pleroma.Upload/filters` in `config/config.exs`)
* `Pleroma.Upload.Filters.Exiftool.ReadDescription` upload filter (related config: `Pleroma.Upload/filters` in `config/config.exs`)

View file

@ -61,17 +61,16 @@ Other than things bundled in the OTP release Pleroma depends on:
Per [`docs/installation/optional/media_graphics_packages.md`](optional/media_graphics_packages.md):
* ImageMagick
* ffmpeg
* exiftool
=== "Alpine"
```
apk update
apk add imagemagick ffmpeg exiftool
apk add imagemagick ffmpeg
```
=== "Debian/Ubuntu"
```
apt install imagemagick ffmpeg libimage-exiftool-perl
apt install imagemagick ffmpeg
```
## Setup