PHPackages                             benbjurstrom/glint - 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. benbjurstrom/glint

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

benbjurstrom/glint
==================

A Cloudflare Images library for Laravel

v0.1.4(3y ago)029MITPHPPHP ^8.1

Since Mar 9Pushed 3y ago1 watchersCompare

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

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

A Cloudflare Images library for Laravel
=======================================

[](#a-cloudflare-images-library-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7d9c9a0e0b9e33eec59cd4d9f6e4cc9a223e8dad149f9d35854c7d64ff875092/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e626a75727374726f6d2f676c696e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/benbjurstrom/glint)[![GitHub Tests Action Status](https://camo.githubusercontent.com/07433554ffea68ad61af29718337be03f714621d7f8e23b81ac0092301694d9f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62656e626a75727374726f6d2f676c696e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/benbjurstrom/glint/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c12e6298c9e79410140541fb64960a3deb241c370fbd431c51ed450c3cbb3a67/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62656e626a75727374726f6d2f676c696e742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/benbjurstrom/glint/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)

️⚠️ WARNING: This package is still in development and not ready for production use. ⚠️
--------------------------------------------------------------------------------------

[](#️️-warning-this-package-is-still-in-development-and-not-ready-for-production-use-️)

For example, currently there's no option to use a custom model in place of the package's Image and ImageType models. I'll add that functionality once my implementation is stable.

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

[](#installation)

Install the package via composer:

```
composer require benbjurstrom/glint
```

Add cloudflare credentials to your services config file:

```
// config/services.php
'cloudflare' => [
    'account_hash' => env('CLOUDFLARE_IMAGES_ACCOUNT_HASH'),
    'account_id' => env('CLOUDFLARE_IMAGES_ACCOUNT_ID'),
    'api_token' => env('CLOUDFLARE_IMAGES_API_TOKEN'),
    'signing_key' => env('CLOUDFLARE_IMAGES_SIGNING_KEY'),
],
```

Then publish and run the migrations with:

```
php artisan vendor:publish --tag="glint-migrations"
php artisan migrate
```

Usage
-----

[](#usage)

### Client upload

[](#client-upload)

Since there's so many ways to handle authentication, authorization, and response formatting this is left to the user to implement. But an example controller might look something like this:

```
    public function store(Request $request)
    {
        Gate::authorize('uploadImages', [
            $request->user()
        ]);

        $data = $request->validate([
            'type_id' => 'required|uuid|exists:image_types,id',
            'model_id' => 'required|uuid',
            'model_type' => 'required',
        ]);

        $modelName = Relation::getMorphedModel($data['model_type']) ?? $data['model_type'];
        $model = (new $modelName)->findOrFail($data['model_id']);
        throw_unless($model instanceof HasImagesInterface,
            \Exception::class, 'Model does not implement HasImagesInterface'
        );

        $type = ImageType::findOrFail($data['type_id']);
        $image = $model->addImageFromDraft($type);

        return response()->json($image);
    }
```

Credits
-------

[](#credits)

- [Ben Bjurstrom](https://github.com/benbjurstrom)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~5 days

Total

5

Last Release

1136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c6e87e7d26b161a120d9f149fabc989bf2d5bcccee4e9972867b477d336b92b?d=identicon)[benbjurstrom](/maintainers/benbjurstrom)

---

Top Contributors

[![benbjurstrom](https://avatars.githubusercontent.com/u/12499093?v=4)](https://github.com/benbjurstrom "benbjurstrom (6 commits)")

---

Tags

laravelbenbjurstromglint

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/benbjurstrom-glint/health.svg)

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

###  Alternatives

[saasykit/laravel-open-graphy

An awesome open graph image (social cards) generator package for Laravel.

13057.0k](/packages/saasykit-laravel-open-graphy)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ace-of-aces/laravel-image-transform-url

Easy, URL-based image transformations inspired by Cloudflare Images.

1756.4k](/packages/ace-of-aces-laravel-image-transform-url)[johncarter/filament-focal-point-picker

An image focal point picker for Filament Admin.

4326.5k1](/packages/johncarter-filament-focal-point-picker)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)[spatie/laravel-og-image

Generate OG images for your Laravel app

305.2k](/packages/spatie-laravel-og-image)

PHPackages © 2026

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