A PHP implementation of Thumbhash with Laravel integration.
Thumbhash is a compact representation of a placeholder for an image.
XFYJhIooaHh6d3hweYuHgHoJmA
9.0 ~ 11.x
Install using composer
composer require iamriajul/thumbhash-laravel
Publish config file (Optional for )
php artisan vendor:publish --provider="Riajul\Thumbhash\ThumbhashServiceProvider"
Set up config file on config/thumbhash.php
Done!
Thumbhash::encode($file);
$file
can be any Intervention make method acceptable source.
app('thumbhash')
->encode(request('file'));
- Support decoding from thumbhash base64 string.
- Support encoding to thumbhash binary array.
- Support decoding from thumbhash binary array.
- Support encoding to dataURL.
Thumbhash is licensed under The MIT License (MIT).