Download the PHP package thoughtco/statamic-blurhash without Composer

On this page you can find all versions of the php package thoughtco/statamic-blurhash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statamic-blurhash

Blur Hash

An add-on for Statamic that encodes, decodes and generates Blur Hash images to use as placeholders during image loading.

Installation

First, require BlurHash as a Composer dependency:

Optionally, you may publish the config file for the BlurHash library this addon makes use of, allowing you finer control over the image output.

Usage

This add-on provides a number of tags:

Outputting a BlurHash image

{{ blur_hash:image }}

or

{{ blur_hash :image="asset" }}

or

{{ blur_hash :url="url" }}

or

{{ blur_hash :id="asset_id" }}

or

{{ blur_hash :path="local_path" }}

This tag will output an encoded image in the following format:

<img src="data:image/png;base64,iVBOR…8f8luO3RPLKe4AAAAAElFTkSuQmCC" />

Any other parameters you pass will be added to the tag, for example:

{{ blur_hash:image width="640" height="640" onload="console.log('loaded')" }}

will output as:

<img src="data:image/png;base64,iVBOR…8f8luO3RPLKe4AAAAAElFTkSuQmCC" width="640" height="640" onload="console.log('loaded')" />

If you want to override the output, you can publish the view to your own views folder by running:

it will then be found at resources/views/vendor/statamic-blurhash/output.blade.php

Encoding a BlurHash image

{{ blur_hash:encode image="path_or_asset" }}

or

{{ blur_hash:encode :url="url" }}

or

{{ blur_hash:encode :id="asset_id" }}

or

{{ blur_hash:encode :path="path" }}

This will return a BlurHash encoded URL, useful if you want to return this to JavaScript or a 3rd party service (such as Algolia).

Decoding a BlurHash image

{{ blur_hash:decode hash="string" }}

This will decode an BlurHash string to an image, following the same conventions as Outputting a BlurHash image.

Support

BlurHash is a free addon so support is provided on an as-we-have-capacity basis. If you have a feature request or experience a bug, please open a GitHub Issue.

Only the latest version of this addon is supported. If you open a bug report using an old version, your issue will be closed.


All versions of statamic-blurhash with dependencies

PHP Build Version
Package Version
Requires bepsvpt/blurhash Version ^3.0.0
laravel/pint Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thoughtco/statamic-blurhash contains the following files

Loading the files please wait ....