- @spec filter(Pleroma.Upload.t()) :: :ok | {:error, String.t()}
- def filter(%Pleroma.Upload{name: file, tempfile: path, content_type: "image" <> _}) do
- # webp is not compatible with exiftool at this time
- if Regex.match?(~r/\.(webp)$/i, file) do
- :ok
- else
- strip_exif(path)
- end
- end