A Python CLI tool to extract rich metadata and image properties from image files or entire directories.
- Extract key EXIF tags (camera make/model, capture time, exposure, aperture, ISO)
- Convert GPS EXIF coordinates to decimal latitude/longitude (when present)
- Show image properties (format, dimensions, color mode)
- Show advanced file metadata (MIME type, SHA256, created/modified UTC timestamps)
- Process a single image file or a directory of images
- Optional recursive directory scan (
--recursive) - Optional JSON output for automation (
--json) - Optional JSON export to file (
--output <file>) - Optional full EXIF dump (
--all-exif) - Works with either direct CLI path or interactive prompt input
- Python 3.8+
- Dependencies:
- exifread
- imagesize
Install dependencies:
pip install exifread imagesizeRun with interactive prompt:
python metadata_extractor.pyRun with direct file path:
python metadata_extractor.py /path/to/image.jpgRun against a directory:
python metadata_extractor.py /path/to/folderRun against a directory recursively:
python metadata_extractor.py /path/to/folder --recursiveJSON output:
python metadata_extractor.py /path/to/image.jpg --jsonSave JSON output to a file:
python metadata_extractor.py /path/to/image.jpg --json --output metadata.jsonInclude all EXIF tags:
python metadata_extractor.py /path/to/image.jpg --all-exif