PHPackages                             metastrip/image - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. metastrip/image

ActiveLibrary[Image &amp; Media](/categories/media)

metastrip/image
===============

A lightweight PHP library for efficiently removing EXIF, IPTC, and other metadata from images while preserving quality. Supports JPEG, PNG, and GIF formats.

14

Since Nov 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mirfan/image-metadata-stripper)[ Packagist](https://packagist.org/packages/metastrip/image)[ RSS](/packages/metastrip-image/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

MetaStrip Image
===============

[](#metastrip-image)

[![CI](https://github.com/metastrip/image/actions/workflows/ci.yml/badge.svg)](https://github.com/metastrip/image/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/536e0118fae1a70c5755ba736895640ee8379cd3f005daf14f081dc3df54dcc6/68747470733a2f2f636f6465636f762e696f2f67682f6d65746173747269702f696d6167652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/metastrip/image)[![Latest Stable Version](https://camo.githubusercontent.com/0cbb235ba715f79f590fe773fc31e4c845e9c235ae0cf47e895a836ecb5974fd/687474703a2f2f706f7365722e707567782e6f72672f6d65746173747269702f696d6167652f76)](https://packagist.org/packages/metastrip/image)[![License](https://camo.githubusercontent.com/15d109f80ec0802ca0cd5c880ca0c4f737f9f1a04eb86b1263ca61d3679ca1df/687474703a2f2f706f7365722e707567782e6f72672f6d65746173747269702f696d6167652f6c6963656e7365)](https://packagist.org/packages/metastrip/image)[![PHP Version Require](https://camo.githubusercontent.com/f9435633659010c6ff7f383e98a31cdbec2f8487172e3036e7afd90613ba88bb/687474703a2f2f706f7365722e707567782e6f72672f6d65746173747269702f696d6167652f726571756972652f706870)](https://packagist.org/packages/metastrip/image)

A lightweight PHP library for efficiently removing EXIF, IPTC, and other metadata from images while preserving quality. Supports JPEG, PNG, and GIF formats.

Features
--------

[](#features)

- Efficient metadata removal with zero quality loss
- Supports multiple image formats and metadata types:
    - JPEG: EXIF and IPTC markers
    - PNG: tEXt, iTXt, and zTXt chunks
    - GIF: XMP and Application Extension blocks
- Privacy-focused: removes sensitive information
- Zero external dependencies (PHP GD only)
- Clean, object-oriented architecture
- Comprehensive test coverage
- PSR-12 compliant

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- GD extension

Installation
------------

[](#installation)

Install via Composer:

```
composer require metastrip/image
```

Usage
-----

[](#usage)

Basic usage:

```
use MetaStrip\Image\ImageProcessorFactory;

// Create processor instance
$processor = ImageProcessorFactory::create();

// Strip metadata from an image
$processor->stripExifData('/path/to/image.jpg');
```

Advanced usage with specific handlers:

```
use MetaStrip\Image\ImageProcessor;
use MetaStrip\Image\ImageHandler\JpegHandler;
use MetaStrip\Image\ImageHandler\PngHandler;
use MetaStrip\Image\ImageHandler\GifHandler;

// Create processor with specific handlers
$processor = new ImageProcessor([
    IMAGETYPE_JPEG => new JpegHandler(),
    IMAGETYPE_PNG => new PngHandler(),
    IMAGETYPE_GIF => new GifHandler(),
]);

// Process multiple images
$processor->stripExifData('/path/to/image1.jpg');
$processor->stripExifData('/path/to/image2.png');
$processor->stripExifData('/path/to/image3.gif');
```

Development
-----------

[](#development)

### Setup

[](#setup)

1. Clone the repository:

```
git clone https://github.com/metastrip/image.git
cd image
```

2. Install dependencies:

```
composer install
```

### Quality Tools

[](#quality-tools)

We use three main tools to ensure code quality:

1. **PHPUnit** - Testing Framework

    ```
    # Run tests
    composer test

    # Generate coverage report
    composer test:coverage
    ```
2. **PHP\_CodeSniffer** - Code Style

    ```
    # Check coding standards
    composer cs

    # Fix coding standards automatically
    composer cs:fix
    ```
3. **PHPStan** - Static Analysis

    ```
    # Run static analysis
    composer stan
    ```

Run all checks at once:

```
composer check
```

### Continuous Integration

[](#continuous-integration)

Our GitHub Actions workflow automatically runs:

- Tests on PHP 8.0, 8.1, and 8.2
- Code style checks
- Static analysis
- Code coverage reporting

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request. By participating in this project, you agree to abide by its terms.

1. Fork the repository
2. Create a feature branch: `git checkout -b feature-name`
3. Make your changes
4. Run the tests: `composer check`
5. Commit your changes: `git commit -m 'Add feature'`
6. Push to the branch: `git push origin feature-name`
7. Submit a pull request

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/83545?v=4)[Mohammed Irfan](/maintainers/mirfan)[@mirfan](https://github.com/mirfan)

---

Top Contributors

[![irfan-manitechnest](https://avatars.githubusercontent.com/u/180293896?v=4)](https://github.com/irfan-manitechnest "irfan-manitechnest (1 commits)")

### Embed Badge

![Health badge](/badges/metastrip-image/health.svg)

```
[![Health](https://phpackages.com/badges/metastrip-image/health.svg)](https://phpackages.com/packages/metastrip-image)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
