Download the PHP package swiss-devjoy/laravel-image-transformations without Composer
On this page you can find all versions of the php package swiss-devjoy/laravel-image-transformations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swiss-devjoy/laravel-image-transformations
More information about swiss-devjoy/laravel-image-transformations
Files in swiss-devjoy/laravel-image-transformations
Package laravel-image-transformations
Short Description Add Cloudflare-like image transformations to your app
License MIT
Homepage https://github.com/swiss-devjoy/laravel-image-transformations
Informations about the package laravel-image-transformations
Secure Cloudflare-like Image Transformations for your Laravel App
Add Cloudflare-like image transformations with security features to your app, inspired by Aaron Francis's image proxy implementation.
Features
- Transform images on-the-fly with simple URL parameters
- Support for various transformations (resize, blur, rotate, brightness, contrast, format conversion, quality)
- Secure URL signing to prevent abuse
- Rate limiting option for unsigned URLs to prevent abuse
- Browser and CDN-friendly caching
- Zero disk storage for transformed images (HTTP caching only)
Installation
You can install the package via composer:
You can publish the config file with:
Configuration
The package comes with sensible defaults, but you can customize the behavior:
Usage
Basic Example
Original image reference:
With transformation:
Transformation Options
Option | Description | Example |
---|---|---|
width |
Scale down to specified width (maintains aspect ratio) | width=300 |
height |
Scale down to specified height (maintains aspect ratio) | height=200 |
format |
Convert image format | format=webp |
quality |
Set compression quality (1-100) | quality=80 |
blur |
Apply blur effect (1-100) | blur=10 |
rotate |
Rotate image (degrees) | rotate=90 |
brightness |
Adjust brightness | brightness=15 |
contrast |
Adjust contrast | contrast=25 |
Security Options
Option 1: Signed URLs (Recommended)
Secure your transformations with cryptographic signatures:
This generates a signed URL like:
Option 2: Rate Limiting
If you prefer not to use signatures:
Direct URLs:
Performance Considerations
- Images are transformed on-the-fly
- No disk storage is used for transformed images
- HTTP caching with appropriate headers (30 days by default)
- Works best with CDNs for edge caching
Example Use Cases
Responsive Images
Creative Effects
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Dimitri König
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-image-transformations with dependencies
illuminate/contracts Version ^10.0||^11.0||^12.0
intervention/image-laravel Version *
spatie/laravel-package-tools Version ^1.16