PHPackages                             gwhthompson/laravel-cloudflare-transforms - 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. gwhthompson/laravel-cloudflare-transforms

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

gwhthompson/laravel-cloudflare-transforms
=========================================

Fluent API for Cloudflare Image Transformation URLs in Laravel

v3.2.2(4mo ago)0134[1 PRs](https://github.com/gwhthompson/laravel-cloudflare-transforms/pulls)MITPHPPHP ^8.3CI passing

Since Jul 29Pushed 1mo agoCompare

[ Source](https://github.com/gwhthompson/laravel-cloudflare-transforms)[ Packagist](https://packagist.org/packages/gwhthompson/laravel-cloudflare-transforms)[ Docs](https://github.com/gwhthompson/laravel-cloudflare-transforms)[ RSS](/packages/gwhthompson-laravel-cloudflare-transforms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (11)Versions (13)Used By (0)

Laravel Cloudflare Transforms
=============================

[](#laravel-cloudflare-transforms)

[![Tests](https://github.com/gwhthompson/laravel-cloudflare-transforms/actions/workflows/tests.yml/badge.svg)](https://github.com/gwhthompson/laravel-cloudflare-transforms/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/5b986af8cba97c5eb61dba012a4b21f8e66d7bb8af5fab66764a332ec3862b8e/68747470733a2f2f636f6465636f762e696f2f67682f67776874686f6d70736f6e2f6c61726176656c2d636c6f7564666c6172652d7472616e73666f726d732f67726170682f62616467652e737667)](https://codecov.io/gh/gwhthompson/laravel-cloudflare-transforms)[![Latest Version](https://camo.githubusercontent.com/a8ad2e3aed9a8cccdf88433796cbd901144e15db095b2e1cc5ada2de2f2613f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67776874686f6d70736f6e2f6c61726176656c2d636c6f7564666c6172652d7472616e73666f726d732e737667)](https://packagist.org/packages/gwhthompson/laravel-cloudflare-transforms)[![License](https://camo.githubusercontent.com/21bb9c113d4b24dba887dafc8404e8a333f7f37d4afe75007fc0285be2c2b41f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67776874686f6d70736f6e2f6c61726176656c2d636c6f7564666c6172652d7472616e73666f726d732e737667)](https://packagist.org/packages/gwhthompson/laravel-cloudflare-transforms)[![Total Downloads](https://camo.githubusercontent.com/fbba755d64d3a5dfe865839a09ef62e37b8e06bfd92987cfcf83ad816d8aea4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67776874686f6d70736f6e2f6c61726176656c2d636c6f7564666c6172652d7472616e73666f726d732e737667)](https://packagist.org/packages/gwhthompson/laravel-cloudflare-transforms)[![PHP Version](https://camo.githubusercontent.com/a1fb9021d8cf29a64a8ba3f8d96f818e41e1263f6a4e38091229240fb01c7050/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f67776874686f6d70736f6e2f6c61726176656c2d636c6f7564666c6172652d7472616e73666f726d732e737667)](https://packagist.org/packages/gwhthompson/laravel-cloudflare-transforms)

Fluent API for [Cloudflare Image Transformations](https://developers.cloudflare.com/images/transform-images/).

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

[](#installation)

Requires PHP 8.3+ and Laravel 11+.

```
composer require gwhthompson/laravel-cloudflare-transforms
```

Set your disk's `url` to a Cloudflare-proxied domain:

```
// config/filesystems.php
'media' => [
    'driver' => 's3',
    'url' => env('CLOUDFLARE_CDN_URL'), // https://cdn.example.com
    // ...
],
```

Usage
-----

[](#usage)

```
Storage::disk('media')->image('photo.jpg')
    ->width(400)
    ->format(Format::Auto)
    ->url();
// → https://cdn.example.com/cdn-cgi/image/w=400,f=auto/photo.jpg

// Responsive srcset
Storage::disk('media')->image('hero.jpg')
    ->srcset([320, 640, 960, 1280]);

// Convenience methods
->optimize()     // format=auto, quality=high
->thumbnail(150) // square crop
->grayscale()
```

Blade Component
---------------

[](#blade-component)

```

```

Enums
-----

[](#enums)

EnumValues`Fit`Contain, Cover, Crop, Pad, ScaleDown, Squeeze`Format`Auto, Avif, Jpeg, Webp`Quality`High, MediumHigh, MediumLow, Low`Gravity`Auto, Top, Bottom, Left, Right, FaceConfiguration
-------------

[](#configuration)

```
php artisan vendor:publish --tag=cloudflare-transforms-config
```

OptionDefaultPurpose`domain``null`Fallback for `CloudflareImage::make()``transform_path``cdn-cgi/image`Custom path with URL rewrite`validate_file_exists``true`Disable for performanceTesting
-------

[](#testing)

```
# .env.testing
CLOUDFLARE_VALIDATE_FILE_EXISTS=false
```

Security
--------

[](#security)

Report vulnerabilities to .

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance83

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.9% 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 ~17 days

Recently: every ~5 days

Total

9

Last Release

145d ago

Major Versions

1.0.3 → 2.0.02025-11-26

2.0.0 → 3.0.02025-12-12

PHP version history (2 changes)1.0.0PHP ^8.4

v3.2.2PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![gwhthompson](https://avatars.githubusercontent.com/u/84133262?v=4)](https://github.com/gwhthompson "gwhthompson (38 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

laravelimagescloudflarecdntransformations

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gwhthompson-laravel-cloudflare-transforms/health.svg)

```
[![Health](https://phpackages.com/badges/gwhthompson-laravel-cloudflare-transforms/health.svg)](https://phpackages.com/packages/gwhthompson-laravel-cloudflare-transforms)
```

###  Alternatives

[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)

PHPackages © 2026

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