Skip to main content

Overview – Image Rules

The Image Rules feature allows you to create and manage multiple rules that can be applied to images based on specific conditions. These rules help automate actions such as resizing images, renaming them, or optimizing them based on predefined criteria.

Rule Statuses

When you access the Image Rules page, you will see the following categories:

  • Deployed Rules – Rules that are currently active and applied.
  • Apply for Previous – Rules that have been applied to previously existing images.
  • Run in Background – Rules that are running in the background and will apply automatically to new images that meet the conditions.
  • Not Deployed Rules – Rules that are created but not yet deployed (inactive).
API image

Creating a New Rule

To create a new rule, click "Create New Rule" and follow these steps:

  1. Add a Condition Group – Define the logic that determines when this rule will apply. You can choose whether:
  • All conditions must be met (AND logic), or
  • Any condition must be met (OR logic).
  1. Add Conditions – Set specific criteria. Examples:
  • Width is longer than 1000px
  • CDN URL includes the word test
API image
  1. Define Actions – Specify what action should be taken if the condition(s) are met. Example:
  • Resize the image to 1000px width

Deploying a Rule

After creating the rule, it will appear under Not Deployed Rules. To activate it, click “Deploy Now”.

Applying the Rule

Once a rule is deployed, you have two options:

  • Apply for Previous – This will search all existing images that match the rule's conditions and apply the defined actions. The system will show you the count of matching old images.
  • Run in Background – Keeps the rule active in the background and automatically applies it to any new images that match the conditions as they are uploaded.