Download the PHP package spacecatninja/imager-x-aws-serverless-transformer without Composer

On this page you can find all versions of the php package spacecatninja/imager-x-aws-serverless-transformer. 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 imager-x-aws-serverless-transformer

AWS Serverless Image Handler transformer for Imager X

A plugin for using AWS Serverless Image Handler as a transformer in Imager X.
Also, an example of how to make a custom transformer for Imager X.

Requirements

This plugin requires Craft CMS 5.0.0-beta.1 or later, Imager X 5.0.0-beta.1 or later, and a working AWS Serverless Image Handler setup.

Usage

First of all, you need to set up an AWS Serverless Image Handler in AWS. If you need help and pointers, Andrew Welch has a thorough blog post about it.

Next, install and configure this transformer as described below. Then, in your Imager X config, set the transformer to awsserverless, ie:

Transforms are now by default transformed with the AWS Serverless Image Handler. Test your configuration with a simple transform like this:

If this doesn't work, make sure the distribution URL is correct, and that the image handler is set up to use the same buckets that you assets are on.

Cave-ats, shortcomings, and tips

This transformer only supports a subset of what Imager X can do when using the default craft transformer. All the basic transform parameters are supported, with the following exceptions:

To pass additional options that is understood by the underlying sharp.js library the Serverless Image Handler uses, you can use the transformerParams transform parameter. Example:

You can also override the automatic converted parameters, like toFormat and resize, if you need to:

For more information, check out the sharp.js documentation.

Installation

To install the plugin, follow these instructions:

  1. Install with composer via composer require spacecatninja/imager-x-aws-serverless-transformer from your project directory.
  2. Install the plugin in the Craft Control Panel under Settings > Plugins, or from the command line via ./craft plugin/install imager-x-aws-serverless-transformer.

Configuration

You can configure the transformer by creating a file in your config folder called imager-x-aws-serverless-transformer.php, and override settings as needed.

distributionUrl [string] (required)

Default: 'distributionUrl'
This is the URL to your AWS Serverless Image Handler distribution. Example:

autoConvertGif [bool]

Default: true
The AWS Image Handler can't output GIF. With this setting set to true (default), the transformer will automatically convert GIF images to PNG to avoid errors. If you manually would like to override this at the template level (by explicitly setting format), you can disable this.

defaultBucket [string]

Default: ''
By default, Imager will try to get the bucket name of the AWS volume for the asset you're trying to transform, and send that to the image handler so that it knows where to get the image from. You can configure the default bucket it should fall back to with this setting. Probably not needed, but you never know.

Make sure you add all the buckets you've set up Craft to use, when you set up your Image Handler in AWS.

signatureKey [string]

Default: ''
The AWS Image Handler supports using signed URLs to prevent third parties from generating their own transforms. Once you’ve configured the image handler to use them, add your signing key and generated URLs will include a ?signature= param that’s properly hashed and ready to go.

Be careful with this! Once enabled on the server side, any transform URL without a valid signature will return an error.

Price, license and support

The plugin is released under the MIT license. It requires Imager X, which is a commercial plugin available in the Craft plugin store. If you need help, or found a bug, please post an issue in this repo, or in Imager X' repo.


All versions of imager-x-aws-serverless-transformer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0.0-beta.1
ssnepenthe/color-utils Version ~0.4
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 spacecatninja/imager-x-aws-serverless-transformer contains the following files

Loading the files please wait ....