New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

intervention/imagecache

Caching extension for the Intervention Image Class
10,115,604 636

Larablocks Analysis

intervention/imagecache works with Laravel 5 to 10 (latest release 2.6.0, Feb 25, 2023), all past end of life (the last on Feb 4, 2025): no more fixes, even for security.

Laravel 4 in earlier releases.

Recommendation checks

Not advised

Not advised: marked abandoned on Packagist.

  • Marked abandoned on Packagist
  • Supports only Laravel 5 to 10, past end of life since Feb 4, 2025
  • No release in the last 12 months (last: Feb 25, 2023)
  • 165,057 downloads a month (at least 10,000)
  • 636 GitHub stars (at least 100)

State

Abandoned
  • Packagist marks this package abandoned.
  • Last stable release: Feb 25, 2023.
  • No releases in the last 12 months.
  • First released: Mar 9, 2013.
  • Monthly downloads: 165,057.
  • 49 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require intervention/imagecache
Latest Version:2.6.0
PHP:~7.2|~8
Laravel:5 – 10
Older releases:4
License:MIT
Last Updated:Dec 9, 2023
Links: GitHub  ·  Packagist
Maintainer: olivervogel

This package is abandoned and will no longer be maintained.

Intervention Image Cache (Abandoned)

Intervention Image Cache extends the Intervention Image Class package to be capable of image caching functionality.

The library uses the Illuminate/Cache package and can be easily integrated into the Laravel Framework. Based on your Laravel cache configuration you are able to choose between Filesystem, Database, Memcached or Redis for the temporary buffer store.

The principle is simple. Every method call to the Intervention Image class is captured and checked by the caching interface. If this particular sequence of operations already have taken place, the data will be loaded directly from the cache instead of a resource-intensive image operation.

Installation

You can install this package quickly and easily with Composer.

Require the package via Composer:

$ composer require intervention/imagecache

Now you are able to require the vendor/autoload.php file to PSR-4 autoload the library.

Laravel Integration

The Image Cache class supports Laravel integration. Best practice to use the library in Laravel is to add the ServiceProvider and Facade of the Intervention Image Class.

Open your Laravel config file config/app.php and add the following lines.

In the $providers array add the service providers for this package.

'providers' => array(

    [...]

    'Intervention\Image\ImageServiceProvider'
),

Add the facade of this package to the $aliases array.

'aliases' => array(

    [...]

    'Image' => 'Intervention\Image\Facades\Image'
),

Usage

The Image Cache is best called by the static method Image::cache from the Intervention Image class.

To create cached images just use the static method Image::cache and pass the image manipulations via closure. The method will automatically detect if a cached file for your particular operations exists.

// run the operations on the image or read a file
// for the particular operations from cache
$img = Image::cache(function($image) {
   return $image->make('public/foo.jpg')->resize(300, 200)->greyscale();
});

Determine a lifetime in minutes for the cache file as an optional second parameter. Pass a boolean true as optional third parameter to return an Intervention Image object instead of a image stream.

// determine a lifetime and return as object instead of string
$img = Image::cache(function($image) {
   return $image->make('public/foo.jpg')->resize(300, 200)->greyscale();
}, 10, true);

Server configuration

If you have Static Resources caching enabled on Nginx please add your cache directory ({route} in config) to static resources handler exclusion:

# where "cache" is {route}
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";
}

License

Intervention Imagecache Class is licensed under the MIT License.

Related Packages

intervention/image

PHP Image Processing

245,758,983 14,392
poznet/image

Simple Image procesing for Laravel 5 - wrapper for intervention/image

157 2
bingvanmoorsel/easyimage

Image handling and manipulation library with support for Laravel integration

120 0
intervention/image-laravel

Laravel Integration of Intervention Image

15,285,525 162
jpeer/lumen-image

Image manipulation library Lumen Framework based on Imagine and inspired by Crop...

58 0

Version History

Version Released PHP Laravel License
2.6.0 ~7.2|~8 ^5.5|~6|~7|~8|~9|~10 MIT
2.5.2 ~7.2|~8 ^5.5|~6|~7|~8|~9 MIT
2.5.1 >=7.2 ^5.5|~6|~7|~8 MIT
2.5.0 ^7.2 ^5.5|~6|~7|~8 MIT
2.4.2 >=5.3.0 ~4|~5|~6|~7 MIT