You can use a filename or file path to apply an Image and Video Manager policy provided that your website follows a file path or filename naming convention similar to the following thumbnail example.
Note that the file
beach_thumb.jpg is in a file directory called
thumb and "thumb" is even included in the filename. This allows you to leverage the images within your delivery configuration. Many companies structure their websites this way to keep assets organized.
If you use this type of file path or file naming convention and want to display your images by leveraging this, follow this process.
Log in to Akamai Control Center, then go to ☰ > CDN > Properties.
Open the property containing the domain for your images and videos. This is also the property for which you created an Image and Video Manager (Images) rule.
Find and select your Image and Video Manager (Images) rule.
Click the dropdown arrow next to Add Rule and select Child Rule.
Select Blank Rule Template and click Insert Rule.
Click the gear icon next to New Rule and select Edit Name to rename the rule "Thumbnails".
Click Add Match, then add the match criteria that will trigger the rule:
To match by filename, enter the filename string. In our example of beach_thumb.jpg, this string is
_thumb. This means any image file with "_thumb" in the name (and a matching file extension) will match the rule.
To match by file path, enter the appropriate string from the path structure of your thumbnail images. In our example, this string is thumb
You can also use both path and filename to support multiple use cases. To do so, you would simply need to add both to the rule and create "either/or" condition. For our example, this would mean the rule is applied if either the path or the filename contains "thumb".
Add the behavior to the rule:
- Click Add Behavior, then find and select the Image and Video Manager Set Parameter behavior.
- Click Insert Behavior.
- Enter the policy name, for example, "thumbnail". This tells Image and Video Manager to use the thumbnail policy if the match criteria are met
Follow your company's procedures for activating a property on staging and production.
Updated 12 months ago