Skip to content

Releases: tojoo-dev/intervention-imagecache

3.0.0

15 Jul 08:54
4b842d3

Choose a tag to compare

⛓️‍💥 Breaking Changes

  • Upgraded intervention/image from v2 to v3
    The package now supports intervention/image v3. This version introduces major architectural changes.

  • Dropped support for Laravel 5.x, 6.x, and 7.x
    intervention/image v3 uses a new Laravel facade package that only supports Laravel 8.x and above.
    See: https://github.com/Intervention/image-laravel?tab=readme-ov-file#requirements

  • Removed built-in cache support from Intervention v3
    Starting from intervention/image v3, the cache() method has been removed. We now provide a dedicated facade for image caching: ImageCache, along with a type-safe interface for improved IDE support and developer experience.

  • Default Cache Driver Behavior
    Previously, ImageCache followed Laravel's default cache driver (cache.default), which could unintentionally store image caches in the database.
    To prevent unexpected database growth, we now default the imagecache.driver to file if not explicitly set in the config.
    You can still override this via the config/imagecache.php file:

    return [
        'driver' => env('IMAGECACHE_DRIVER', 'file'),
    ];

🚀 Usage Example

use Intervention\Image\Laravel\Facades\ImageCache;
use Intervention\Image\Interfaces\ImageCacheInterface;

$img = ImageCache::cache(
    function (ImageCacheInterface $image) {
        return $image->make('public/foo.jpg')
            ->resize(300, 200)
            ->greyscale()
            ->blur(5)
            ->sharpen(10)
            ->rotate(45)
            ->brightness(20);
    },
    60, // Cache duration in minutes
    true // Return as Image object
);

✨ New Features

  • Laravel 11 and 12 Support
    This package now fully compatible with Laravel 11 and Laravel 12.

🔗 Full Changelog: 2.6.0...3.0.0