What is it?
Image varieties are a powerful tool in MySource Matrix which allow you to set different size constraints for an image to be adjusted when it is uploaded. These different sized images can then be used as smaller preview versions for the real image.
Assets used: Image, Trigger
How do I do it?
Craete the trigger
- Open the System Management folder in the Asset Map and right click on the Trigger Manager.
- Select New Child > Trigger > Trigger *note that you can only create triggers in the Trigger Manager, any other location will cause an error.
- Type an appropriate name for the trigger and if you’d like a description.
- In the Events list check the Asset Created tickbox. These events will fire after certain actions are performed in MySource Matrix and provide useful ways to automate processes.
- Change the dropdown under Conditions to Asset is of Type and then change the Actions dropdown to Create Image Variety and commit the changes
- Reacquire the locks on the asset and change the Asset is of Type to Image. Create another condition type for Tree Location. This will allow you to have site specific triggers.
- In the Create Image Variety section give the variety a meaningful name as you will be using this to reference the image in asset listings or paint layouts.
- Set the constraints you would like the image set to, this can be whichever sizes you wish. You can also constrain by Height, Width, Both or Neither. This will result in the following:
- Height: Once the image hits the specified height constraint it will no longer resize regardless of width.
- Width: Once the image hits the specified width constraint it will no longer resize regardless of height.
- Both: Once the image hits the specified width OR height constraint it will no longer resize.
- Neither: The image will be resized to the exact dimensions specified in height and width.
- If you would like another image variety simple add another new action type of Image Variety and repeat step 8 as many times as desired.
- Once you are finished set the status on the trigger to Enabled.
- Upload a new image under the appropriate tree area and expand it and voila! More image varieties than you can poke a stick at.
If you want to retroactively apply this trigger to the images in your site you can run a batch job from the trigger manager which will allow you to do this.
Run a batch job
- Open the System Management folder and right click on the Trigger Manager and select Batching.
- Acquire the locks and select the node you would like the trigger to run on.
- Select the same Event trigger that you used above, Asset Created.
- Once you commit the changes a Hipo will run which simulates the images already uploaded to this area being created. If you now expand them you will see that they have image varieties applied.