bepsvpt / blurhash
A PHP implementation of BlurHash with Laravel integration.
Installs: 120 212
Dependents: 5
Suggesters: 0
Security: 0
Stars: 117
Watchers: 3
Forks: 8
Open Issues: 0
Requires
- php: ^8.0
- ext-exif: *
- illuminate/support: ^8.0 || ^9.0 || ^10.0 || ^11.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.42
- jcupitt/vips: ^2.3
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- orchestra/testbench: ^6.43 || ^7.41 || ^8.22 || ^9.0
- phpunit/phpunit: ^9.6
Suggests
- ext-ffi: Required to use php-vips driver.
- ext-gd: Required to use GD driver.
- ext-imagick: Required to use Imagick driver.
- jcupitt/vips: Required to use php-vips driver.
README
A PHP implementation of BlurHash with Laravel integration.
BlurHash is a compact representation of a placeholder for an image.
Nr8%YLkDR4j[aej]NSaznzjuk9ayR3jYofayj[f6
Version
3.0.1
Supported Laravel Version
8.0 ~ 11.x
Installation
Install using composer
composer require bepsvpt/blurhash
Publish config file
php artisan vendor:publish --provider="Bepsvpt\Blurhash\BlurHashServiceProvider"
Set up config file on config/blurhash.php
Done!
Usage
Facade
BlurHash::encode($path);
$file
can be UploadedFile
or a file path string.
app helper function
app('blurhash') ->setComponentX(7) ->setComponentY(4) ->setMaxSize(96) ->encode(request('file'));
Changelog
Please see CHANGELOG for details.
Upgrade
Please see UPGRADE for details.
License
BlurHash is licensed under The MIT License (MIT).