Docs | imagemash.io
DashboardSign up for Free
  • 🎉imagemash.io
  • 🚀Getting Started
    • Simple CDN Link Usage
  • 💽Sources
    • IM Cloud Storage
    • Image URL
    • Storage Providers
      • Amazon S3
      • Google Cloud
      • S3 Compatible Storage
    • Web Folder
  • 🖼️Image Transform
    • Transform Options
      • Quality
      • Width
      • Height
      • Scale
      • Crop
      • Gravity
      • Background
      • Border
      • Round
      • Output Format
      • Angle (Rotate)
      • Flip
      • Helpers
        • x, y
      • Filters
        • Tint
        • Flatten
        • Grayscale
        • Blur
        • Sharpen
        • Median
        • Threshold
        • Negative
    • Transform Cheat Sheet
    • Named Transforms
  • 🛠️API
    • API - Good to knows
    • API Methods
      • Account
        • Named Transforms
          • Get named transforms
          • Add named transform
          • Remove named transform
        • Image URL Restriction
          • Get keyword list
          • Add keyword to list
          • Remove keyword from list
          • Change keyword list usage
      • Storage
        • Upload file
        • Get and search files
        • Delete files
        • Add new tags to files
        • Set tags of files
        • Remove tags from files
        • Purge Cache
      • Optimize / Transform
  • ❓How it works?
    • Custom Domain
    • Bandwidth
    • Cloud Storage
    • Caching
    • Purge Cache
    • Limits
  • Contact Us
Powered by GitBook
On this page
  1. Image Transform

Named Transforms

PreviousTransform Cheat SheetNextAPI - Good to knows

Last updated 2 years ago

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

Go to your Dashboard and try out Named Transforms.

When putting a named transform in your transform string, you should write n_ before your named transform. Eg. thumbnail -> n_thumbnail

https://demo.imagemash.io/w_150,h_150,g_face,c_thumb,r_100,bo_5_skyblue/woman2.jpg

https://demo.imagemash.io/n_thumbnail/woman2.jpg

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.

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

You can edit your named transforms in your dashboard.

For example:

You have a named transform called thumbnail

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 w_100 to w_150. Previous images that have n_thumbnail will still be w_100. Change will affect only new transforms. Possible solution other than purging:

Add parameter after your n_thumbnail. It will override the previous w_100 in your n_thumnail. So you don't need to change your thumbnail at all.

Eg. demo.imagemash.io/n_thumbnail,w_150/woman2.jpg

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

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 your images.

🖼️
purge
https://demo.imagemash.io/woman2.jpg