1. Go to this page and download the library: Download tobimori/kirby-thumbhash library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$file->thumbhash([ 'ratio' => 16/9 ]); // will return thumbhash string, cropped to 16:9
$file->thumbhashUri([ 'blur' => 2 ]); // will return placeholder, encoded in an svg with blur filter
$file->thumbhashUri([ 'ratio' => 3/2, 'blur' => 0 ]); // will return placeholder as base64-encoded png without filter, cropped to 3:2
use tobimori\ThumbHash;
ThumbHash::clearCache($file);