PHPackages                             withcandour/statamic-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. withcandour/statamic-imgix

ActiveLibrary[Image &amp; Media](/categories/media)

withcandour/statamic-imgix
==========================

Statamic Imgix

0.1.5(3y ago)06.9k↓50%2[2 issues](https://github.com/WithCandour/statamic-imgix/issues)PHP

Since Jan 13Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/WithCandour/statamic-imgix)[ Packagist](https://packagist.org/packages/withcandour/statamic-imgix)[ RSS](/packages/withcandour-statamic-imgix/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

Statamic Imgix
==============

[](#statamic-imgix)

[![Statamic 3.0+](https://camo.githubusercontent.com/93c61a311851e398f5663226aca5d307d91ef898067c6b294110a785d6c2e735/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/93c61a311851e398f5663226aca5d307d91ef898067c6b294110a785d6c2e735/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)

Generate imgix URLs from your antlers templates with the Statamic Imgix addon.

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

[](#installation)

#### Install via composer:

[](#install-via-composer)

```
composer require withcandour/statamic-imgix

```

Then publish the publishables from the service provider:

```
php artisan vendor:publish --provider="WithCandour\StatamicImgix\ServiceProvider"

```

#### Config

[](#config)

After publishing the config you will have a `config/imgix.php` file. You will need to provide your imgix domain in here.

Usage
-----

[](#usage)

The addon will provide a set of Imgix tags for use in your antlers templates.

### Tags

[](#tags)

This addon will provide a set of imgix tags for generating imgix URL's and elements that use them. The minimum requirement for these tags is that you provide it with a `path` parameter, this is the path or url for the asset source, it is recommended that you use the `{{ path }}` variable returned inside of a pair of asset tags.

Tags will accept any of the [Imgix manipulation parameters](https://docs.imgix.com/apis/rendering). Tags which generate a tag (such as the `{{ imgix:image_tag }}` tag) will also accept all standard HTML attributes (i.e 'alt'), these will then get added to the element/tag produced.

TagDescription[imgix](#tag-imgix)The base tag - this will simply generate an imgix URL[imgix:image\_url](#tag-imgix)An alias of `{{ imgix }}`[imgix:image\_srcset](#tag-imgix-srcset)Generates a srcset for use in an img tag[imgix:image\_tag](#tag-imgix-image)Generates an `;` tag from your parameters[imgix:responsive\_image\_tag](#tag-imgix-image-responsive)Generates an `` element with a srcset[imgix:responsive\_picture\_tag](#tag-imgix-responsive-picture)Generates an `` element for displaying different images at different sizes#### Imgix

[](#imgix)

The base `{{ imgix }}` tag will produce a simple imgix URL with any imgix manipulation parameters appended to the URL. #### Image srcset

[](#image-srcset)

Similarly to the base tag, the `{{ imgix:image\_srcset }}` tag will produce a string containing a srcset (suitable for use in an `&lt;img /&gt;` element). By default the srcset will contain @1x and @2x image sizes (to handle retina screens). You may override this behaviour by setting the `srcset\_resolutions` in the config file; this will need to be an array of numbers, representing the resolutions. For example:

```
return [
    'srcset_resolutions' => [1, 4, 5],
];
```

#### Image tag

[](#image-tag)

The `{{ imgix:image\_tag }}` tag will produce an `&lt;img /&gt;` element with the 'src' attribute set to the image. Any and all HTML attributes may also be passed as parameters. #### Responsive image tag

[](#responsive-image-tag)

The `{{ imgix:responsive\_image\_tag }}` tag will combine the powers of the srcset and the image\_tag tags to produce an `&lt;img /&gt;` element with a srcset attribute. #### Responsive picture tag

[](#responsive-picture-tag)

This tag is a little different to the others, a special `sizes` parameter will be used to produce a `&lt;picture /&gt;` element with multiple `&lt;source /&gt;` blocks. This will enable you to target specific breakpoints in order to display correctly sized images. For example:

```
{{
    imgix:responsive_picture_tag
    :path="path"
    :alt="alt"
    fit="crop"
    crop="faces"
    sizes="768: [1500x960]|560: [920x550]|200: [600x400]"
}}

```

This tag will produce a picture tag with sources so that:

- At 200-559px a 600x400 image will be shown
- At 560-767px a 920x550 image will be shown
- At 768px+ a 1500x960 image will be shown

### Focal point cropping

[](#focal-point-cropping)

This addon supports focalpoint cropping by using the `{{ focus }}` variable, generated using the focal point selector in the CMS. In order to use focalpoint cropping in your templates, combine `fit="crop"`, `crop="focalpoint"` and `focus="{focus}"` (or `:focus="focus"`) in the tag.

For example:

```
{{ my_image_field }}
    {{
        imgix:responsive_image_tag
        w="1920"
        h="1080"
        :path="path"
        :alt="alt
        fit="crop"
        crop="focalpoint"
        :focus="focus"
    }}
{{ /my_image_field }}

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~102 days

Recently: every ~125 days

Total

6

Last Release

1442d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ad6111bfa2634bb972dc97a1b5b8c17e166260dae281d93876bc93b3f50c43f?d=identicon)[withcandour](/maintainers/withcandour)

---

Top Contributors

[![AndrewHaine](https://avatars.githubusercontent.com/u/16389134?v=4)](https://github.com/AndrewHaine "AndrewHaine (13 commits)")[![jonrcarey](https://avatars.githubusercontent.com/u/13708983?v=4)](https://github.com/jonrcarey "jonrcarey (10 commits)")[![jackwakefield](https://avatars.githubusercontent.com/u/893609?v=4)](https://github.com/jackwakefield "jackwakefield (5 commits)")[![Eworm](https://avatars.githubusercontent.com/u/511488?v=4)](https://github.com/Eworm "Eworm (1 commits)")[![joshuanoyes](https://avatars.githubusercontent.com/u/2377389?v=4)](https://github.com/joshuanoyes "joshuanoyes (1 commits)")

### Embed Badge

![Health badge](/badges/withcandour-statamic-imgix/health.svg)

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

###  Alternatives

[spacecatninja/imager-x

Ninja powered image transforms.

29390.0k23](/packages/spacecatninja-imager-x)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[contao/image

Contao image library

131.7M9](/packages/contao-image)[intervention/image-driver-vips

libvips driver for Intervention Image

4495.5k6](/packages/intervention-image-driver-vips)[elgentos/magento2-imgix

Imgix extension for Magento 2 to process images

1668.0k](/packages/elgentos-magento2-imgix)[otisz/laravel-imgix

1419.4k](/packages/otisz-laravel-imgix)

PHPackages © 2026

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