nickwelsh/fennel

A (nearly) feature complete, drop-in replacement for Cloudflare Images

Fund package maintenance!
nickwelsh

v0.1.1-beta 2025-04-16 18:15 UTC

This package is auto-updated.

Last update: 2025-04-16 18:17:48 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.