PHPackages                             iamriajul/thumbhash-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iamriajul/thumbhash-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

iamriajul/thumbhash-laravel
===========================

A PHP implementation of Thumbhash with Laravel integration.

1.0.3(11mo ago)111.0k↓50%1MITPHPPHP ^8.1CI passing

Since Oct 31Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/iamriajul/thumbhash-laravel)[ Packagist](https://packagist.org/packages/iamriajul/thumbhash-laravel)[ Docs](https://github.com/iamriajul/thumbhash-laravel)[ RSS](/packages/iamriajul-thumbhash-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

Thumbhash
=========

[](#thumbhash)

[![Testing](https://github.com/iamriajul/thumbhash-laravel/actions/workflows/testing.yml/badge.svg)](https://github.com/iamriajul/thumbhash-laravel/actions/workflows/testing.yml)[![Latest Stable Version](https://camo.githubusercontent.com/1d52d8ecf512f1b40ae101d6882d2282b490bd05354df9fd8a52aee164b556f6/68747470733a2f2f706f7365722e707567782e6f72672f69616d7269616a756c2f7468756d62686173682d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/iamriajul/thumbhash-laravel)[![Total Downloads](https://camo.githubusercontent.com/dc3936d732406d43519b5d3d36b6f44a8f3b95a0729f3bb2127a37cc4bfa290d/68747470733a2f2f706f7365722e707567782e6f72672f69616d7269616a756c2f7468756d62686173682d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/iamriajul/thumbhash-laravel)[![License](https://camo.githubusercontent.com/f4dbcdcaffc1017d4f22b625a8c05e331c01a20aa4e9739463f9208675da534a/68747470733a2f2f706f7365722e707567782e6f72672f69616d7269616a756c2f7468756d62686173682d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/iamriajul/thumbhash-laravel)

A PHP implementation of [Thumbhash](https://github.com/evanw/thumbhash) with Laravel integration.

Thumbhash is a compact representation of a placeholder for an image.

[![screenshot](screenshot.png)](screenshot.png)

XFYJhIooaHh6d3hweYuHgHoJmA

⚠️ I highly recommend to have Imagick extension installed on your computer. GD extension has only 7 bits of alpha channel resolution, and 127 is transparent, 0 opaque. While the library will still work, you may have different image between platforms. [See on stackoverflow](https://stackoverflow.com/questions/41079110/is-it-possible-to-retrieve-the-alpha-value-of-a-pixel-of-a-png-file-in-the-0-255)

Supported Laravel Version
-------------------------

[](#supported-laravel-version)

9.0 ~ 12.x

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

[](#installation)

Install using composer

```
composer require iamriajul/thumbhash-laravel
```

Publish config file (Optional for )

```
php artisan vendor:publish --provider="Riajul\Thumbhash\ThumbhashServiceProvider"
```

Set up config file on config/thumbhash.php

Done!

Usage
-----

[](#usage)

### Facade

[](#facade)

```
Thumbhash::encode($file);
```

`$file` can be any [Intervention make method](https://image.intervention.io/v2/api/make) acceptable source.

### app helper function

[](#app-helper-function)

```
app('thumbhash')
  ->encode(request('file'));
```

### TODO:

[](#todo)

- Support decoding from thumbhash base64 string.
- Support encoding to thumbhash binary array.
- Support decoding from thumbhash binary array.
- Support encoding to dataURL.

License
-------

[](#license)

Thumbhash is licensed under [The MIT License (MIT).](LICENSE.md)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance50

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.3% 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 ~193 days

Total

4

Last Release

349d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.0.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/bad451d4a40585f95b235069f584762472a7b17716c3b60883b9c82eecdf4110?d=identicon)[iamriajul](/maintainers/iamriajul)

---

Top Contributors

[![bepsvpt](https://avatars.githubusercontent.com/u/8221099?v=4)](https://github.com/bepsvpt "bepsvpt (62 commits)")[![iamriajul](https://avatars.githubusercontent.com/u/24244379?v=4)](https://github.com/iamriajul "iamriajul (32 commits)")[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (1 commits)")[![DaniTulp](https://avatars.githubusercontent.com/u/18421761?v=4)](https://github.com/DaniTulp "DaniTulp (1 commits)")[![jeffreyvanhees](https://avatars.githubusercontent.com/u/8754630?v=4)](https://github.com/jeffreyvanhees "jeffreyvanhees (1 commits)")[![me-shaon](https://avatars.githubusercontent.com/u/831997?v=4)](https://github.com/me-shaon "me-shaon (1 commits)")

---

Tags

laravelthumbhash

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/iamriajul-thumbhash-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/iamriajul-thumbhash-laravel/health.svg)](https://phpackages.com/packages/iamriajul-thumbhash-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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