PHPackages                             shitric/cloudflare-images - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. shitric/cloudflare-images

ActiveLibrary[File &amp; Storage](/categories/file-storage)

shitric/cloudflare-images
=========================

A simple PHP class for CloudFlare Images CDN

v1.1(2y ago)203.2k↑380%5MITPHPPHP &gt;=7.2 || &gt;=8.0

Since May 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Shitric/cloudflare-images)[ Packagist](https://packagist.org/packages/shitric/cloudflare-images)[ RSS](/packages/shitric-cloudflare-images/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

CloudFlare Images
=================

[](#cloudflare-images)

A simple PHP class for CloudFlare Images CDN.

Dependencies
============

[](#dependencies)

1. PHP 7.3+
2. cURL Library

Installation
============

[](#installation)

**With composer**

```
composer require shitric/cloudflare-images

```

**Manual**

- Download the Images.php file from src
- Include your project with require or require\_once functions. Choose what if you want.

Usage
=====

[](#usage)

**Creating new instance.**

You can get the construct parameters from your CloudFlare account.

```
$cloudFlareImages = new Images('Account_ID', 'API_Token', 'Images_Hash', 'Domain');
```

**Image Uploading**

I highly recommend using it with the try-catch block. Because this method throws Exception for cURL.

- 3rd parameter for delete image file after the uploading. Default value is `false`.
- 4th parameter for metadata. Default value is `[]`.
- 5th parameter for custom ID (max 1024 alpha-numeric chars). Default is `''` and lets Cloudflare generate the image ID. See [Cloudflare Docs](https://developers.cloudflare.com/images/cloudflare-images/upload-images/custom-id/)

Returns Image ID for getting the uploaded image from CDN

```
$imageId = $cloudFlareImages->uploadImageFile('File_Path', 'File_Name', false, ['key'=>'value'], 'Custom_ID');
```

**Getting the Uploaded Image URL**

Just give the Image ID and it will returns the direct Image url. Second parameter for image variant. Default is **public**.

```
$cloudFlareImages->getImageUrl('Image_ID', 'Variant');
```

**Deleting the Image from CDN**

Returns **True** or **False**.

```
$cloudFlareImages->deleteImage('Image_ID');
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

961d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45553532?v=4)[Furkan](/maintainers/Shitric)[@Shitric](https://github.com/Shitric)

---

Top Contributors

[![Shitric](https://avatars.githubusercontent.com/u/45553532?v=4)](https://github.com/Shitric "Shitric (6 commits)")[![amathieson](https://avatars.githubusercontent.com/u/994583?v=4)](https://github.com/amathieson "amathieson (2 commits)")[![pau1phi11ips](https://avatars.githubusercontent.com/u/677264?v=4)](https://github.com/pau1phi11ips "pau1phi11ips (1 commits)")

### Embed Badge

![Health badge](/badges/shitric-cloudflare-images/health.svg)

```
[![Health](https://phpackages.com/badges/shitric-cloudflare-images/health.svg)](https://phpackages.com/packages/shitric-cloudflare-images)
```

PHPackages © 2026

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