Merge branch 'exif' into 'develop'

Ensure StripLocation works for PNGs

See merge request pleroma/pleroma!4167
This commit is contained in:
lain 2024-06-30 09:28:17 +00:00
commit ccbbee7963
5 changed files with 24 additions and 19 deletions

View file

@ -16,7 +16,9 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripLocation do
def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do
try do
case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true) do
case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", "-png:all=", file],
parallelism: true
) do
{_response, 0} -> {:ok, :filtered}
{error, 1} -> {:error, error}
end