PHPackages                             glimpseimg/glimpse-php - 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. [API Development](/categories/api)
4. /
5. glimpseimg/glimpse-php

ActiveLibrary[API Development](/categories/api)

glimpseimg/glimpse-php
======================

PHP SDK for glimpseimg.com: convert, optimize, resize, thumbnail, inspect, and analyze images.

v0.2.0(1mo ago)032[1 PRs](https://github.com/mathiasgrimm/glimpse-php/pulls)1MITPHPPHP ^8.2CI passing

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/mathiasgrimm/glimpse-php)[ Packagist](https://packagist.org/packages/glimpseimg/glimpse-php)[ RSS](/packages/glimpseimg-glimpse-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (3)Used By (1)

 [![glimpse: ship smaller images, skip the toolchain](art/banner.avif)](https://glimpseimg.com)

 Ship smaller images. Skip the toolchain.
 Convert, optimize, resize, thumbnail and analyze images from any PHP application.
 The official PHP SDK for [**glimpseimg.com**](https://glimpseimg.com), the image API for developers.

 [![Latest Version on Packagist](https://camo.githubusercontent.com/4da9cbdc33d39ab1563c1fd83519f06576354796317e5e792bb10f0092958aab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174686961736772696d6d2f676c696d7073652d7068703f7374796c653d666c61742d737175617265266c6162656c3d7061636b6167697374)](https://packagist.org/packages/mathiasgrimm/glimpse-php) [![Tests](https://camo.githubusercontent.com/6cd9fa3aba3afb0083f21725ac9dd63c5b0b16bc8d12c8497576d8d6cb5f56b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6174686961736772696d6d2f676c696d7073652d7068702f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mathiasgrimm/glimpse-php/actions/workflows/ci.yml) [![Total Downloads](https://camo.githubusercontent.com/a0727a2d82390ba1a06c26ff12fa5b19df6022fa044f3f7232c0156c9f0d940c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6174686961736772696d6d2f676c696d7073652d7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mathiasgrimm/glimpse-php) [![PHP Version](https://camo.githubusercontent.com/2a4c7e658e647bcdeefe96fab81c8b12f53e8b4fb47471462a1e43f7d513a0c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6174686961736772696d6d2f676c696d7073652d7068702f7068703f7374796c653d666c61742d737175617265266c6162656c3d706870)](https://packagist.org/packages/mathiasgrimm/glimpse-php) [![License](https://camo.githubusercontent.com/a6eec9a101a100e8ed64e86776c49c1c081a9530bb1c3fdc6ffffc2d6d3dd82d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6174686961736772696d6d2f676c696d7073652d7068703f7374796c653d666c61742d737175617265)](LICENSE)

---

Shipping images means wrangling ImageMagick, libvips, mozjpeg, cwebp and avifenc: compiled binaries that differ between your laptop, your teammate's laptop, and production. **glimpse-php replaces all of them with one method call**, with zero binary dependencies. The heavy lifting happens on the [Glimpse API](https://glimpseimg.com): stateless, nothing stored, your bytes never linger. You require a single package and go:

```
composer require mathiasgrimm/glimpse-php
```

```
use MathiasGrimm\GlimpsePhp\Client;
use MathiasGrimm\GlimpsePhp\ImageFormat;
use Illuminate\Http\Client\Factory;

$glimpse = new Client(new Factory, 'your-api-token');

$avif = $glimpse->convert(file_get_contents('photo.jpg'), ImageFormat::Avif);
file_put_contents('photo.avif', $avif->bytes);
```

That is the whole integration: no extensions to compile, no binaries to pin, no queue of shell-outs to babysit. Every method returns typed, immutable results.

Documentation
-------------

[](#documentation)

The full documentation lives at **[glimpseimg.com/docs/sdk](https://glimpseimg.com/docs/sdk)**:

- [Installation](https://glimpseimg.com/docs/sdk/installation): requirements and optional extensions.
- [Authentication](https://glimpseimg.com/docs/sdk/authentication): building the client and verifying tokens.
- [Methods](https://glimpseimg.com/docs/sdk/methods): every method and the typed objects it returns.
- [Laravel](https://glimpseimg.com/docs/sdk/laravel): container wiring and `Http::fake()` in tests.
- [Errors](https://glimpseimg.com/docs/sdk/errors): the exception hierarchy.

Upgrading from v1? The [upgrade guide](https://glimpseimg.com/docs/sdk/upgrade) covers the move from array returns to typed objects.

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

[](#development)

```
composer install
composer test        # Pint (check), PHPStan, and the Pest suite
```

### Releasing

[](#releasing)

```
make release VERSION=vX.Y.Z
```

Runs the test suite, tags `VERSION`, pushes the tag, and creates the GitHub release. Packagist picks the new tag up through the GitHub webhook.

License
-------

[](#license)

glimpse-php is open-source software licensed under the [MIT license](LICENSE).

---

 Prefer the terminal? [**glimpse-cli**](https://github.com/mathiasgrimm/glimpse-cli) is the first-party CLI: the same API from your shell and CI, no PHP code required.
 Grab a free API key at [**glimpseimg.com**](https://glimpseimg.com) (**Settings → API Tokens**).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance92

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56f4dbd80bb6510bdc2adc49fcf7ec925cb45535b3bfdadf0964a09d678cf8ab?d=identicon)[mathiasgrimm](/maintainers/mathiasgrimm)

---

Top Contributors

[![mathiasgrimm](https://avatars.githubusercontent.com/u/450069?v=4)](https://github.com/mathiasgrimm "mathiasgrimm (25 commits)")

---

Tags

apithumbnailsdkconvertimageresizegifpngjpegjpgWebpavifoptimizeglimpse

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/glimpseimg-glimpse-php/health.svg)

```
[![Health](https://phpackages.com/badges/glimpseimg-glimpse-php/health.svg)](https://phpackages.com/packages/glimpseimg-glimpse-php)
```

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[image-charts/image-charts

Official Image-Charts.com API client library

2871.0k](/packages/image-charts-image-charts)

PHPackages © 2026

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