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 9mo 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 1w 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

16

—

LowBetter than 4% of packages

Maintenance41

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

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://avatars.githubusercontent.com/u/170031590?v=4)[Softlancer](/maintainers/softlancerIn)[@softlancerIn](https://github.com/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

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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