PHPackages                             spacecatninja/imager-x-imgix-transformer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. spacecatninja/imager-x-imgix-transformer

ActiveCraft-plugin[Image &amp; Media](/categories/media)

spacecatninja/imager-x-imgix-transformer
========================================

Imgix transformer for Imager X

1.0.0(1mo ago)00MITPHPPHP ^8.2

Since Mar 6Pushed 1mo agoCompare

[ Source](https://github.com/spacecatninja/craft-imager-x-imgix-transformer)[ Packagist](https://packagist.org/packages/spacecatninja/imager-x-imgix-transformer)[ RSS](/packages/spacecatninja-imager-x-imgix-transformer/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

Imgix transformer for Imager X
==============================

[](#imgix-transformer-for-imager-x)

A plugin for using [Imgix](https://imgix.com/) as a transformer in Imager X.

*This functionality was originally part of Imager X core, but has been extracted into a separate plugin as of Imager X 6.0.*

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 5.0.0 or later, [Imager X 6.0.0](https://github.com/spacecatninja/craft-imager-x/) or later, and an account at [Imgix](https://imgix.com/).

Usage
-----

[](#usage)

Install and configure this transformer as described below. Then, in your [Imager X config](https://imager-x.spacecat.ninja/configuration.html), set the transformer to `imgix`, ie:

```
'transformer' => 'imgix',

```

Transforms are now by default transformed with Imgix, test your configuration with a simple transform like this:

```
{% set transform = craft.imagerx.transformImage(asset, { width: 600 }) %}

URL is: {{ transform.url }}

```

If this doesn't work, make sure you've configured a `defaultProfile`, have a profile with the correct name, and that Imgix is configured correctly.

### Cave-ats, shortcomings, and tips

[](#cave-ats-shortcomings-and-tips)

This transformer only supports a subset of what Imager X can do when using the default `craft` transformer.

To pass additional options directly to Imgix, you can use the `transformerParams` transform parameter. Example:

```
{% set transforms = craft.imagerx.transformImage(asset,
    [{width: 400}, {width: 600}, {width: 800}],
    { ratio: 2/1, transformerParams: { sharp: 10 } }
) %}

```

Refer to the [Imgix Rendering API Documentation](https://docs.imgix.com/en-US/apis/rendering/overview) for more information and parameters to use.

Installation
------------

[](#installation)

To install the plugin, follow these instructions:

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

Configuration
-------------

[](#configuration)

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

```
