PHPackages                             gumlet/craft-gumlet-imagetransformer - 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. gumlet/craft-gumlet-imagetransformer

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

gumlet/craft-gumlet-imagetransformer
====================================

Gumlet image transformer for Craft CMS

1.5.3(4mo ago)0801[1 issues](https://github.com/akbansa/craft-gumlet-imagetransformer/issues)[1 PRs](https://github.com/akbansa/craft-gumlet-imagetransformer/pulls)MITPHPPHP ^8.0.2

Since Dec 10Pushed 4mo agoCompare

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

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Gumlet Asset Transformer for Craft CMS
======================================

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

Adds Gumlet powered asset transforms to Craft CMS:

1. Drop-in replacement for Craft CMS native image transforms and `.srcset()` method
2. Add additional Gumlet parameters to image transforms
3. Use Gumlet for CP thumbnails
4. Allows `.pdf` files to be rasterized and transformed (unlike Craft CMS transforms)

The only thing you'll need to update is your filesystem Base URL to use your Gumlet domain.

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

[](#requirements)

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

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

[](#installation)

You can install this plugin with Composer.

```
composer require gumlet/craft-gumlet-imagetransformer -w && php craft plugin/install gumlet-imagetransformer
```

Then update your filesystem Base URL to use your Gumlet domain.

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

[](#configuration)

Copy `config.php` into Craft's config folder and rename it to `gumlet-imagetransformer.php`.

```
cp vendor/gumlet/craft-gumlet-imagetransformer/src/config.php config/gumlet-imagetransformer.php
```

Update the `gumletDomain` config setting with your Gumlet domain.

```
return [
    'gumletDomain' => 'your-domain.gumlet.io',
    'enabled' => true,
    'defaultQuality' => 80,
    'defaultFormat' => 'auto',
    'autoFormat' => true,
];
```

Usage
-----

[](#usage)

This plugin provides multiple ways to generate Gumlet URLs for your images:

1. **Automatic transformer** (when configured as default) - Works with `asset.setTransform()` and `asset.url`
2. **Twig function** - Use `gumletUrl()` function in templates
3. **Service method** - Use `craft.gumlet.buildUrl()` in templates

### Method 1: Using Twig Function (Recommended)

[](#method-1-using-twig-function-recommended)

The easiest way to generate Gumlet URLs is using the `gumletUrl()` Twig function:

```
{# Basic usage with transform array #}

{# With additional Gumlet parameters #}

{# With quality and format #}

```

### Method 2: Using Service Method

[](#method-2-using-service-method)

You can also use the Gumlet service directly:

```
{# Basic usage #}

{# With Gumlet-specific parameters as third argument #}

{# Without transform (just replaces domain) #}

```

### Method 3: Using Asset Transforms and Transformation Arrays

[](#method-3-using-asset-transforms-and-transformation-arrays)

If the Gumlet transformer is set as the default, you can use Craft's native transform methods:

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

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

#### Direct Transformation Array Support

[](#direct-transformation-array-support)

You can now also pass a transformation array directly to `getUrl`, `getWidth`, and `getHeight`:

```
{% set thumb = {
  mode: 'crop',
  width: 100,
  height: 100,
  quality: 75,
  position: 'top-center'
} %}

```

This works for both standard named transforms and custom arrays, and will always generate a Gumlet URL.

**Note:** The automatic transformer may not always be active depending on your Craft CMS configuration. Using `gumletUrl()` or `craft.gumlet.buildUrl()` is more reliable.

### Adding Additional Gumlet Parameters

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

In addition to the standard Craft CMS transform options:

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

You can also apply additional Gumlet parameters by passing them as the third argument:

```
{# Using gumletUrl() function #}

{# Using service method #}

```

### Available Gumlet Parameters

[](#available-gumlet-parameters)

Gumlet supports many transformation parameters. Some common ones include:

- `blur` - Apply blur effect (0-100)
- `brightness` - Adjust brightness (-100 to 100)
- `contrast` - Adjust contrast (-100 to 100)
- `saturation` - Adjust saturation (-100 to 100)
- `sharpen` - Sharpen the image (0-100)
- `rotate` - Rotate image (degrees)
- `flip` - Flip image ('h' for horizontal, 'v' for vertical)
- `watermark` - Add watermark
- `text` - Add text overlay

For a complete list of available parameters, see the [Gumlet Image Transformation API documentation](https://docs.gumlet.com/docs/image-transform-apis).

**Note:** This plugin uses Gumlet's standard short parameter names (`w` for width, `h` for height, `q` for quality, `f` for format). These are the default parameter names used by Gumlet's image transformation API.

Mapping
-------

[](#mapping)

### Transform Modes

[](#transform-modes)

Craft CMS transform modes are mapped to Gumlet fit parameters:

- `crop` → `crop`
- `fit` → `clip`
- `stretch` → `scale`
- `letterbox` → `clip`

### Position

[](#position)

Craft CMS positions are mapped to Gumlet crop positions:

- `top-left` → `top-left`
- `top-center` → `top`
- `top-right` → `top-right`
- `center-left` → `left`
- `center-center` → `center`
- `center-right` → `right`
- `bottom-left` → `bottom-left`
- `bottom-center` → `bottom`
- `bottom-right` → `bottom-right`

Support
-------

[](#support)

For issues, questions, or contributions, please visit the [GitHub repository](https://github.com/akbansa/craft-gumlet-imagetransformer).

License
-------

[](#license)

This plugin is licensed under the MIT License. See [LICENSE](LICENSE) for details.

Credits
-------

[](#credits)

Developed by [Anshul Bansal](https://github.com/akbansa)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.4% 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 ~11 days

Total

4

Last Release

120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/962fcb41910cd46087b11f7718a25490c837845f043669b8fd5e3f869ceee882?d=identicon)[akbansa](/maintainers/akbansa)

---

Top Contributors

[![akbansa](https://avatars.githubusercontent.com/u/13042781?v=4)](https://github.com/akbansa "akbansa (27 commits)")[![cbovers](https://avatars.githubusercontent.com/u/29738458?v=4)](https://github.com/cbovers "cbovers (1 commits)")

---

Tags

pluginimagecmstransformCraftcraftcmsgumlet

### Embed Badge

![Health badge](/badges/gumlet-craft-gumlet-imagetransformer/health.svg)

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

###  Alternatives

[spacecatninja/imager-x

Ninja powered image transforms.

29390.0k23](/packages/spacecatninja-imager-x)[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)

PHPackages © 2026

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