> For the complete documentation index, see [llms.txt](https://docs.imagemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imagemash.io/image-transform/named-transforms.md).

# Named Transforms

Named transforms are custom shortcut strings for image transformations.

For example;

You are using `w_150,h_150,g_face,c_thumb,r_100,bo_5_skyblue` transform string for small thumbnails for your images. You can assign this long transform string to a smaller string like `thumbnail` and call it from your transform string as `n_thumbnail`

{% hint style="success" %}
Go to your Dashboard and try out Named Transforms.
{% endhint %}

{% hint style="warning" %}
When putting a named transform in your transform string, you should write <mark style="color:yellow;">n\_</mark> before your named transform.\
Eg. thumbnail -> n\_thumbnail
{% endhint %}

{% tabs %}
{% tab title="Without Named Transform" %}
`https://demo.imagemash.io/w_150,h_150,g_face,c_thumb,r_100,bo_5_skyblue/woman2.jpg`

<figure><img src="https://demo.imagemash.io/w_150,h_150,g_face,c_thumb,r_100,bo_5_skyblue/woman2.jpg" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="With Named Transform" %}
`https://demo.imagemash.io/n_thumbnail/woman2.jpg`

<figure><img src="https://demo.imagemash.io/n_thumbnail/woman2.jpg" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Original" %}

<figure><img src="https://demo.imagemash.io/w_600/woman2.jpg" alt=""><figcaption><p><a href="https://demo.imagemash.io/woman2.jpg">https://demo.imagemash.io/woman2.jpg</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="success" %}
You can also send additional parameters while using named transforms. You can even override the named transform parameter by writing a new parameter after your transform string.
{% endhint %}

It helps you to create understandable parameters and boosts your speed.

You can edit your named transforms in your dashboard.

{% hint style="danger" %}
Be careful about caching. If you change the parameters of your named transform, previous images containing this named transform will serve the previous versions, because they are cached. You may need to [purge](/how-it-works/purge-cache.md) your images.

\
For example:

You have a named transform called <mark style="color:orange;">`thumbnail`</mark>

You used this named transform to serve images. Now you decided to add some parameters or change the parameters of it. Let's say you changed <mark style="color:orange;">`w_100`</mark> to <mark style="color:orange;">`w_150`</mark>. Previous images that have <mark style="color:orange;">`n_thumbnail`</mark> will still be <mark style="color:orange;">`w_100`</mark>. Change will affect only new transforms. \
\
Possible solution other than purging:

Add parameter after your <mark style="color:orange;">`n_thumbnail`</mark>. It will override the previous <mark style="color:orange;">`w_100`</mark> in your <mark style="color:orange;">`n_thumnail`</mark>. So you don't need to change your thumbnail at all.

Eg. `demo.imagemash.io/n_thumbnail,w_150/woman2.jpg`
{% endhint %}

### Named Transform Behaviours

Depending on the selected behavior, it adds security layers to your CDN Link.

* **No Behaviour**\
  All transform requests are allowed.
* **Transform string must contain at least 1 named transform**\
  If no named transform in the transform string, the server will ignore the request.
* **Ignore all transforms except named transforms**\
  Only named transforms are allowed in the transform string


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.imagemash.io/image-transform/named-transforms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
