The IMQuery transformation lets you control which transformations are possible using the IMQuery string. This is particularly useful if you want to allow a creative team to apply certain transformations without giving them access to your Image and Video Manager policies.
Here is an example of an image before and after a query string parameter was applied to change the background color to green.
With the query string parameter applied:
Before you begin, you should know the URL of the image you are adding the watermark to, for example,
New Policy Manager UI
These instructions reflect the new beta version of Policy Manager. If you are using the original version, some things may have changed. To try the new beta, click Switch to BETA.
Log in to Akamai Control Center, then go to ☰ > CDN > Image and Video Manager.
Select the correct Contract from the list.
Create a new policy:
- Click +Create, then click Policy on the menu that appears
- Select the policy set to which you wish to add the new policy
- Give your new policy a name, for example, "imquery_background"
- Click Create
The Image Policy Editor opens.
Expand the list of Transformations by clicking +.
Configure the settings as follows:
Query Parameter Variable. Select the default variable im or select Add Variable from the list to enter your own variable.
Allowed Transformations. Select only Background Color.
Click Save and Test on Staging.
Now that you have configured the imquery-background policy to include the IMQuery transformation, you can control the background color of our image simply by changing the IMQuery string parameter.
To change the background color of the image to green, append the IMQuery string parameter ?im=BackgroundColor=abab50 to the URL:
To change the background color to blue, change the string parameter to "?im=BackgroundColor=507eab"
Updated about 1 year ago