Download the PHP package zenstruck/image without Composer

On this page you can find all versions of the php package zenstruck/image. 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 image

zenstruck/image

CI Status codecov

Image file wrapper to provide image-specific transformations, and ThumbHash generator.

Installation

Usage

[!NOTE] Zenstruck\ImageFileInfo extends \SplFileInfo.

[!NOTE] Images created with ImageFileInfo::from() are created in unique temporary files and deleted at the end of the script.

Transformations

The following transformers are available:

To use the desired transformer, type-hint the first parameter of the callable passed to Zenstruck\ImageFileInfo::transform() with the desired transformer's image object:

[!NOTE] The return value of the callable must be the same as the passed parameter.

The following example uses \GdImage but any of the above type-hints can be used.

Transform "In Place"

Filter Objects

Both Imagine and Intervention have the concept of filters. These are objects that can be passed directly to transform() and transformInPlace():

Custom Filter Objects

Because transform() and transformInPlace() accept any callable, you can wrap complex transformations into invokable filter objects:

To use, pass a new instance to transform() or transformInPlace():

Transformation Object

Zenstruck\ImageFileInfo::as() returns a new instance of the desired transformation library's image object:

ThumbHash

A very compact representation of an image placeholder. Store it inline with your data and show it while the real image is loading for a smoother loading experience.

-- evanw.github.io/thumbhash

[!NOTE] srwiez/thumbhash is required for this feature (install with composer require srwiez/thumbhash).

[!NOTE] Imagick is required for this feature.

Generate from Image

[!CAUTION] Generating from an image can be slow depending on the size of the source image. It is recommended to cache the data-uri and/or key for subsequent requests of the same ThumbHash image.

Generate from Key

When generating from an image, the ThumbHash::key() method returns a small string that can be stored for later use. This key can be used to generate the ThumbHash without needing to re-process the image.


All versions of image with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/polyfill-php81 Version ^1.26
zenstruck/temp-file Version ^1.0
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 zenstruck/image contains the following files

Loading the files please wait ....