Apply your policies
There are three ways to apply an Image & Video Manager policy to the images or videos in your website or application:
Let the default policy be applied
If you used distinct policy set names in separate Image & Video Manager rules to distinguish treatment of your images and videos, then your web performance configuration is already set up to apply the default policy for each policy set.
Use the Set Parameter behavior
Add the Image & Video Manager Set Parameter behavior to the Image & Video Manager rule that applies to the request.
You can use this option if:
- You used Image & Video Manager rules to select requests based on strings in the URLs, or
- You followed the instructions in Add the Set Parameter behavior to assign the appropriate policy name to each request.
Add query string parameters to URLs
Add query string parameters to the image or video URLs on your website. You will need to modify your website's HTML to include parameters in the image or video URLs. The parameters are in the request before it reaches the CDN.
To use query string parameters to apply a policy to an image or video, append the following after the file name in the URL:
- A question mark
- The query string key, for example:
- An equal sign
- The value of the query string key
To chain multiple parameters together, use the ampersand (&) character.
Each parameter type—policy name, image width, image format, and pixel density—can only be applied once to a given request. If a URL contains multiple instances of the same parameter, Image & Video Manager only uses the last one.
You can apply only one image or video policy to a URL. Many content management systems (CMS) include tools to manage query string parameters in URLs. It's common to insert query string parameters via a website's CMS.
Updated 8 months ago