Skip to main content

An easy-to-use tool to ensure image EXIF metadata is removed.

Project description

exif-stripper

An easy-to-use tool to ensure image EXIF metadata is removed. Read more about why this is important here.

Usage

Pre-commit hook

Add the following to your .pre-commit-config.yaml file:

- repo: https://github.com/stefmolin/exif-stripper
  rev: <version>
  hooks:
    - id: strip-exif

If you only want to remove certain fields, use the --fields argument. Note that this argument supports multiple options, which are shown when running exif-stripper --help. Be very careful when doing this as you might be leaving some sensitive information behind. Here, we only remove GPS information:

- repo: https://github.com/stefmolin/exif-stripper
  rev: <version>
  hooks:
    - id: strip-exif
      args: [--fields=gps]

Be sure to check out the pre-commit documentation for additional configuration options.

Command line

First, install the exif-stripper package from PyPI:

$ python -m pip install exif-stripper

Then, use the exif-stripper entry point on the file(s) of your choice (use strip-exif for versions before 0.6.0):

$ exif-stripper /path/to/file [/path/to/another/file]

Run exif-stripper --help for more information.

Python

First, install the exif-stripper package from PyPI:

$ python -m pip install exif-stripper

Then, use the process_image() function on individual files (returns True if the file was altered and False otherwise):

from exif_stripper import process_image
process_image('/path/to/image')

Note: This requires version 0.4.0 or above.

Contributing

Please consult the contributing guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exif_stripper-1.2.0.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exif_stripper-1.2.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file exif_stripper-1.2.0.tar.gz.

File metadata

  • Download URL: exif_stripper-1.2.0.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exif_stripper-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2296d5ad3811a4042854d195f5fdc402cd25d8a53ac213abefedcb341b536fb5
MD5 5b5627633c74023b9402ce8763e2db7b
BLAKE2b-256 7848d3fe518ed2bd3faeb329dab76cb5effe476614a6ddcbdb2e0128596332c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for exif_stripper-1.2.0.tar.gz:

Publisher: pypi-publish.yml on stefmolin/exif-stripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exif_stripper-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: exif_stripper-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exif_stripper-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c921969e5125e28ddd38ddd85fe749be27d5547451b64289caf23853e9e16a9a
MD5 2438bdf32bd67228202613f242454823
BLAKE2b-256 cd0848ebf226df6651b9164389ac119ce5f4d00d2998294e7b2854a271c48815

See more details on using hashes here.

Provenance

The following attestation bundles were made for exif_stripper-1.2.0-py3-none-any.whl:

Publisher: pypi-publish.yml on stefmolin/exif-stripper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page