PHPackages                             sapientpro/image-comparator-laravel - 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. sapientpro/image-comparator-laravel

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

sapientpro/image-comparator-laravel
===================================

Compare images using Laravel

v1.1.0(1y ago)910.0k↓50%1MITPHPPHP ^8.1

Since May 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sapientpro/image-comparator-laravel)[ Packagist](https://packagist.org/packages/sapientpro/image-comparator-laravel)[ RSS](/packages/sapientpro-image-comparator-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (6)Used By (0)

Image Comparator Laravel: Compare images using Laravel
======================================================

[](#image-comparator-laravel-compare-images-using-laravel)

[![https://packagist.org/packages/sapientpro/image-comparator-laravel](https://camo.githubusercontent.com/4c87fe6cbd4a80dc0ac41fd64bc92e4775ea49b5fe356f3aa838f3477d173b31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)](https://camo.githubusercontent.com/4c87fe6cbd4a80dc0ac41fd64bc92e4775ea49b5fe356f3aa838f3477d173b31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)[![https://packagist.org/packages/sapientpro/image-comparator-laravel](https://camo.githubusercontent.com/d8b431cb10f27755f4d74eb07911dc855441fa869a2c202c73738aa959758363/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)](https://camo.githubusercontent.com/d8b431cb10f27755f4d74eb07911dc855441fa869a2c202c73738aa959758363/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)[![https://packagist.org/packages/sapientpro/image-comparator-laravel](https://camo.githubusercontent.com/b2cff4faa9556220fafb39d9a1ea83d4947eb71d400131a4c99354e84d66ac2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)](https://camo.githubusercontent.com/b2cff4faa9556220fafb39d9a1ea83d4947eb71d400131a4c99354e84d66ac2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73617069656e7470726f2f696d6167652d636f6d70617261746f722d6c61726176656c)

This package is a wrapper of [Image Comparator package](https://github.com/sapientpro/image-comparator)adapted to use with Laravel via Facade. All methods of Image Comparator are available in the Facade. For the method reference visit the [wiki](https://github.com/sapientpro/image-comparator/wiki)

Prerequisites
-------------

[](#prerequisites)

- php 8.1 or higher
- Laravel 8 or higher
- Gd extension enabled

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

[](#installation)

You can install the package using Composer: `composer require sapientpro/image-comparator-laravel`

Usage
-----

[](#usage)

You can start using the Image Comparator Facade by including it in your class:

```
use SapientPro\ImageComparatorLaravel\Facades\Comparator;

$imageHash = Comparator::hashImage('path_to_image.jpg')
```

By default, the average hashing algorithm is user for hashing and comparing images. If you want to use difference hashing algorithm, you set it with `setHashStrategy()` function:

```
use SapientPro\ImageComparatorLaravel\Facades\Comparator;
use SapientPro\ImageComparator\Strategy\DifferenceHashStrategy;

Comparator::setHashStrategy(new DifferenceHashStrategy());

$similarity = Comparator::compare('path_to_image1.jpg', 'path_to_image2.jpg') // will use difference hash algorithm
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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.

###  Release Activity

Cadence

Every ~312 days

Total

3

Last Release

532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49f5f12f2b5e4d05c45945a4f3e9b94142da5c90ef79b56d22ba3a18f1d7a372?d=identicon)[sapient.pro](/maintainers/sapient.pro)

---

Top Contributors

[![vadymtsots](https://avatars.githubusercontent.com/u/73906449?v=4)](https://github.com/vadymtsots "vadymtsots (2 commits)")[![D4lv1k](https://avatars.githubusercontent.com/u/92361604?v=4)](https://github.com/D4lv1k "D4lv1k (1 commits)")

---

Tags

image-comparisonimage-hashinglaravellaravel8laravel9phpphp8

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sapientpro-image-comparator-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M182](/packages/intervention-image-laravel)

PHPackages © 2026

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