eamirgh / optimus
High-performance image and asset optimization engine for Laravel
v1.0.1
2026-09-24 09:46 UTC
Requires
- php: ^8.2
- illuminate/cache: ^11.0|^12.0|^13.0
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/filesystem: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/queue: ^11.0|^12.0|^13.0
- illuminate/routing: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/view: ^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-28 21:01:44 UTC
README
High-performance image and asset performance optimization engine for Laravel 11, 12, and 13.
Features
- Blade Components:
<x-image>,<x-link>,<x-script>,<x-ga>,@optimusCssBg. - Strategy Drivers: GD (
ext-gd), Imagick (ext-imagick), Imgproxy (edge cluster), Cloudinary (SaaS). - Format Negotiation: Content-negotiated AVIF and WebP delivery based on HTTP
Acceptheader. - Security & DoS Protection: HMAC-SHA256 URL signing and strict dimension whitelisting.
- Thundering Herd Mitigation: Atomic cache lock serialization preventing cache stampedes.
- Dual Architecture:
- Low-Scale / Monolithic: Synchronous on-the-fly generation cached to disk (
try_filesfriendly). - High-Scale / Distributed: Asynchronous variant pregeneration (
GenerateImageVariantsJob) with Eloquent model trait (HasOptimusImages).
- Low-Scale / Monolithic: Synchronous on-the-fly generation cached to disk (
- Secondary Compression: Post-processing execution of
pngquant,jpegoptim,cwebp,gifsicle. - Cache Maintenance:
php artisan optimus:clear-stalecommand. - Test Suite & Benchmarks: Full TDD unit & feature coverage with Orchestra Testbench and standalone benchmark suite.
Installation
composer require eamirgh/optimus php artisan vendor:publish --tag=optimus-config
Running Tests, Benchmarks & Docs
cd optimus make install # Install composer and npm dependencies make test # Run PHPUnit test suite make benchmark # Run performance benchmark suite make docs-dev # Start local VitePress docs server make docs-build # Build production docs