PHPackages                             newism/craft-imgix - 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. newism/craft-imgix

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

newism/craft-imgix
==================

Imgix asset transforms for Craft CMS

5.0.0-alpha.8(7mo ago)01.2k1[1 PRs](https://github.com/newism/craft-imgix/pulls)proprietaryPHP

Since Feb 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/newism/craft-imgix)[ Packagist](https://packagist.org/packages/newism/craft-imgix)[ RSS](/packages/newism-craft-imgix/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

Imgix Asset Transformer for Craft CMS
=====================================

[](#imgix-asset-transformer-for-craft-cms)

Adds imgix powered asset transforms to Craft CMS:

1. Drop-in replacement for Craft CMS native [image transforms](https://craftcms.com/docs/5.x/development/image-transforms.html) and [.srcset()](https://craftcms.com/docs/5.x/development/image-transforms.html#generating-srcset-sizes) method
2. Add additional imgix parameters to image transforms
3. Use imgix for CP thumbnails
4. Allows `.pdf` files to be rasterized and transformed (unlike Craft CMS transforms)

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

[](#requirements)

This plugin requires Craft CMS 4.0.0 or later, and PHP 8.0.2 or later.

See Caveats for additional requirements.

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

[](#installation)

You can install this plugin with Composer.

```
composer require newism/craft-imgix -w && php craft plugin/install newism-imgix
```

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

[](#configuration)

Copy config.php into Crafts config folder and rename it to newism-imgix.php.

```
cp vendor/newism/craft-imgix/src/config.php config/newism-imgix.php
```

Update the `imgixDomain` config setting key with your imgix domain.

Usage
-----

[](#usage)

This plugin is a drop-in replacement for Craft CMS native [image transforms](https://craftcms.com/docs/5.x/development/image-transforms.html) and [.srcset()](https://craftcms.com/docs/5.x/development/image-transforms.html#generating-srcset-sizes) method.

You shouldn't have to update any of your templates unless you want to add additional imgix parameters.

### Adding additional transform parameters

[](#adding-additional-transform-parameters)

In addition to the standard Craft CMS transform options:

- `mode`
- `width`
- `height`
- `quality`
- `format`
- `position`
- `fill`

This plugin adds a `ratio` option which allows you to set the aspect ratio of the image. This will automatically set the `mode` to `crop` and use the image's width and focal point.

```
{# Set the transform #}
{% do asset.setTransform({
    ratio: 16/9,
}) %}

{# Render the tag #}
{{ tag('img', {
  src: asset.url,
  width: asset.width,
  height: asset.height,
  srcset: asset.getSrcset(['1.5x', '2x', '3x']),
  alt: asset.title,
}) }}
```

You can also apply additional imgix parameters to your image transforms by adding them to the transform options under the `imgix` object key.

```
{# Set the transform #}
{% do asset.setTransform({
    width: 300,
    height: 300,
    imgix: {
        blur: 20,
    },
}) %}

{# Render the tag #}
{{ tag('img', {
  src: asset.url,
  width: asset.width,
  height: asset.height,
  srcset: asset.getSrcset(['1.5x', '2x', '3x']),
  alt: asset.title,
}) }}
```

### Caveats

[](#caveats)

#### .svg

[](#svg)

imgix does not support rasterizing .svg inputs by default ([blog post](https://www.imgix.com/blog/announcing-support-for-webp-and-svg)). You will need to contact imgix to enable this feature. This plugin does add transform query parameters to .svg files regardless of this setting.

#### .pdf

[](#pdf)

.pdf file are served with `rasterize-bypass` set to true when no transform is provided. This will serve the original .pdf file.

> The `rasterize-bypass` parameter allows users to bypass all rendering parameters, including default parameters, and serve the original image file. This is particularly useful for file formats that support vector graphics and do not require rasterization. [Source](https://docs.imgix.com/en-US/apis/rendering/format/rasterize-bypass)

#### `imgix` object key values

[](#imgix-object-key-values)

In Craft CMS &lt; v5.6.0 the additional `imgix` object key values are lost when calling [.srcset()](https://craftcms.com/docs/5.x/development/image-transforms.html#generating-srcset-sizes).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance75

Regular maintenance activity

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~54 days

Total

8

Last Release

217d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c91398084bc17848b56c2dc015c3c257fb5871f246f7296a99f1ceba072e4f?d=identicon)[leevigraham](/maintainers/leevigraham)

---

Top Contributors

[![leevigraham](https://avatars.githubusercontent.com/u/25124?v=4)](https://github.com/leevigraham "leevigraham (13 commits)")[![iainsaxon](https://avatars.githubusercontent.com/u/546517?v=4)](https://github.com/iainsaxon "iainsaxon (1 commits)")

---

Tags

craftcmscraftcms-plugincmsCraftcraftcmscraft-pluginimgix

### Embed Badge

![Health badge](/badges/newism-craft-imgix/health.svg)

```
[![Health](https://phpackages.com/badges/newism-craft-imgix/health.svg)](https://phpackages.com/packages/newism-craft-imgix)
```

###  Alternatives

[nystudio107/craft-imageoptimize

Automatically create &amp; optimize responsive image transforms, using either native Craft transforms or a service like imgix, with zero template changes.

232337.2k16](/packages/nystudio107-craft-imageoptimize)[spacecatninja/imager-x

Ninja powered image transforms.

29390.0k23](/packages/spacecatninja-imager-x)[nystudio107/craft-youtubeliveembed

This plugin allows you to embed a YouTube live stream and/or live chat on your webpage

163.7k](/packages/nystudio107-craft-youtubeliveembed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
