PHPackages                             softlancerin/image-cache - 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. [Caching](/categories/caching)
4. /
5. softlancerin/image-cache

ActiveLibrary[Caching](/categories/caching)

softlancerin/image-cache
========================

Caching extension for the Intervention Image Class

03

Since Nov 8Pushed 6mo agoCompare

[ Source](https://github.com/softlancerIn/image-cache)[ Packagist](https://packagist.org/packages/softlancerin/image-cache)[ RSS](/packages/softlancerin-image-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

🖼️ Intervention Image Cache (Modern Fork)
=========================================

[](#️-intervention-image-cache-modern-fork)

> ⚙️ **A modern maintained fork** of the original [Intervention Image Cache](https://github.com/Intervention/imagecache) package. 🚧 The original package has been **abandoned**, so this version focuses on maintaining stability and compatibility with modern PHP and Laravel versions.

---

### ⚠️ Important Notes

[](#️-important-notes)

> **⚠️ CAUTION:**This package is currently **unstable**, as it still depends on the original `intervention/image` package for certain configurations (like the config path).

---

📦 Overview
----------

[](#-overview)

**Intervention Image Cache** extends the core [Intervention Image](https://github.com/Intervention/image/) functionality by adding **powerful caching capabilities** for optimized image handling.

It integrates seamlessly with [Illuminate/Cache](https://github.com/illuminate/cache/) — making it easy to use with the [Laravel Framework](https://laravel.com/). Depending on your cache configuration, it supports:

- 🗂️ Filesystem
- 🧠 Database
- ⚡ Memcached
- 🔥 Redis

💡 **How it works:**Each image manipulation is tracked and cached. If the same sequence of operations is requested again, the cached result is returned instead of processing the image again — saving time and resources.

---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require softlancerin/image-cache:dev-master
```

Once installed, make sure to include Composer’s autoload file if not already:

```
require 'vendor/autoload.php';
```

---

⚡ Laravel Integration
---------------------

[](#-laravel-integration)

To use **Intervention Image Cache** with Laravel, register the Service Provider and Facade in your `config/app.php` file.

### Add to the `providers` array:

[](#add-to-the-providers-array)

```
'providers' => [
    // ...
    Intervention\Image\ImageServiceProvider::class,
],
```

That’s it! 🎉 You can now use the `Image` facade for caching operations within your Laravel application.

---

🧩 Usage Example
---------------

[](#-usage-example)

Use the static method `Image::cache()` to perform image operations with automatic caching.

### Basic Example

[](#basic-example)

```
use Intervention\Image\Facades\Image;

$img = Image::cache(function($image) {
    return $image->make('public/foo.jpg')->resize(300, 200)->greyscale();
});
```

### With Cache Lifetime

[](#with-cache-lifetime)

You can define the cache lifetime (in minutes) and optionally return an **Image object** instead of a stream.

```
$img = Image::cache(function($image) {
    return $image->make('public/foo.jpg')->resize(300, 200)->greyscale();
}, 10, true);
```

---

🌐 Server Configuration (Nginx Example)
--------------------------------------

[](#-server-configuration-nginx-example)

If you’re using **Nginx** and have static resource caching enabled, make sure to **exclude your cache directory** (defined in your config, e.g., `/cache`) from static caching:

```
# Exclude "cache" directory from static caching
location ~* ^\/(?!cache).*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
    expires max;
    access_log off;
    add_header Cache-Control "public";
}
```

---

🛠️ Handled &amp; Supported By
-----------------------------

[](#️-handled--supported-by)

> 🧩 **This modern fork is handled and actively supported by [Softlancerin](https://github.com/softlancerin)** — empowering open-source PHP &amp; Laravel development with modern solutions and community-driven updates.

---

📜 License
---------

[](#-license)

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). Use it freely for both commercial and personal projects.

---

### 💡 Maintained By

[](#-maintained-by)

**Softlancerin Innovations** — modernizing PHP packages for the developer community. ⭐ Feel free to star this repo if you find it helpful!

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

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.

### Community

Maintainers

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

---

Top Contributors

[![softlancerIn](https://avatars.githubusercontent.com/u/170031590?v=4)](https://github.com/softlancerIn "softlancerIn (1 commits)")

### Embed Badge

![Health badge](/badges/softlancerin-image-cache/health.svg)

```
[![Health](https://phpackages.com/badges/softlancerin-image-cache/health.svg)](https://phpackages.com/packages/softlancerin-image-cache)
```

###  Alternatives

[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)[cheprasov/php-redis-client

Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0

1281.2M21](/packages/cheprasov-php-redis-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

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