Display images using the filename or path

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.

https://www.secrettropicalbeaches.com/destinations/thumb/beach_thumb.jpg

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.

How to

  1. Log in to ​Akamai Control Center​, then go to > CDN > Properties.

  2. 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.

  3. Find and select your Image and Video Manager (Images) rule.

  4. Click the dropdown arrow next to Add Rule and select Child Rule.

  5. Select Blank Rule Template and click Insert Rule.

  6. Click the gear icon next to New Rule and select Edit Name to rename the rule "Thumbnails".

  7. 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 /*/thumb/.

https://www.secrettropicalbeaches.com/destinations/thumb/beach_thumb.jpg?.

📘

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".

  1. 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
  2. Click Save.

  3. Follow your company's procedures for activating a property on staging and production.