New

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

folklore/laravel-image

On-the-fly image renditions for Laravel: presets, signed URLs and responsive variants, behind a CDN
8,893 4
Install
composer require folklore/laravel-image
Latest Version:v1.1.1
PHP:^8.2
Laravel:9 – 13
License:MIT
Last Updated:Nov 13, 2026
Links: GitHub  ·  Packagist
Maintainer: dmongeau

Laravel Image

Tests

On-the-fly image renditions for Laravel: presets, crops, formats and responsive variants, rendered once and served behind a CDN.

This is the v2.x branch, where 2.0 is developed, and the default branch. 2.0 is released as alphas (composer require folklore/laravel-image:^2.0@alpha, PHP 8.3+ and Laravel 12+); an alpha can break the previous one, so read the CHANGELOG before you update. 1.x is maintained on v1.x: composer require folklore/laravel-image:^1.1.

2.0

2.0 is built on Intervention Image 4, with libvips when available:

Image::for($media)->preset('card')->url();
Image::for('uploads/photo.jpg')->width(800)->ratio('16:9')->avif()->url();
Image::for($media)->variants('card'); // width, height and URL of each variant, for APIs

In the alphas today:

  • Presets and canonical specs, in versioned URLs that change when a preset or an original changes.
  • Secure by default: opt-in routes (Route::image()), presets or signed URLs only, enforced limits, private images through expiring URLs.
  • Derivatives rendered once with libvips, Imagick or GD, stored on any Laravel disk with a lock per variant, served with long-lived caching headers behind a CDN.
  • Sources resolved from disks, and from media ids with laravel-mediatheque 2's media resolver.
  • ImageVariantResource, Image::fake() and image:doctor.

Upgrading from 1.x: 1.x URLs keep working through Route::imageLegacy(), and a compatibility layer keeps the 1.x API working, deprecated, until 3.0. php artisan image:upgrade --check lists what a project uses; docs/upgrade.md has the steps.

Planned (roadmap): focal point and non-destructive edits (transform), channel presets, responsive images with srcset() and <x-image>, more operations, and the Rector rules of the upgrade.

The guides of the alpha are in docs/guides/: getting started, presets, URLs and signatures and delivery behind a CDN.

The plan is in docs/: the architecture, the decisions, the roadmap and the upgrade guide. #3 is the index of the plan and tracks 1.x.

Contributing

See CONTRIBUTING.md for the workflow, and SECURITY.md to report a vulnerability privately.

License

MIT. See LICENSE.md.

Related Packages

intervention/image

PHP Image Processing

240,656,400 14,385
intervention/image-laravel

Laravel Integration of Intervention Image

14,454,401 161
jasis/image-resizer

Image resizer library for laravel

36 0
maximumadvertising/laravel-image-resize

Dynamically resize an image and returns the URL using Intervention and Storage

2,080 6
reliqarts/laravel-guided-image

Simplified and ready image manipulation for Laravel via intervention image.

1,714 34

Version History

Version Released PHP Laravel License
v1.1.1 ^8.2 ^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.1.0 ^8.2 ^9.0|^10.0|^11.0|^12.0|^13.0 MIT
Pre-releases (5)
Version Released PHP Laravel License
v2.0.0-alpha.5 ^8.3 ^12.0|^13.0 MIT
v2.0.0-alpha.4 ^8.3 ^12.0|^13.0 MIT
v2.0.0-alpha.3 ^8.3 ^12.0|^13.0 MIT
v2.0.0-alpha.2 ^8.3 ^12.0|^13.0 MIT
v2.0.0-alpha.1 ^8.3 ^12.0|^13.0 MIT