nickwelsh / fennel
A (nearly) feature complete, drop-in replacement for Cloudflare Images
Fund package maintenance!
nickwelsh
Requires
- php: ^8.3
- ext-imagick: *
- illuminate/contracts: ^11.0||^12.0
- intervention/image-laravel: ^1.5
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- ext-gd: *
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2025-04-16 18:17:48 UTC
README
A (nearly) feature complete, drop-in replacement for Cloudflare Images
Installation
You can install the package via composer:
composer require nickwelsh/fennel
You can publish the config file with:
php artisan vendor:publish --tag="fennel-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="fennel-views"
Usage
Use as a blade component:
<x-fennel-image src="beach.jpg" width="500" :format="\nickwelsh\Fennel\Enums\ImageFormat::AVIF" />
This will generate the following HTML:
<img src="/images/beach.jpg/width=500,format=avif" alt="" width="500">
Use the Fennel
facade to generate a URL:
Fennel::fromPath('beach.jpg')->width(500)->format(ImageFormat::AVIF)->getUrl();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.