If you are using the wcm.io Media Handler, some extra metadata needs to be generated for all renditions (except the original rendition) of any Asset used with it. This metadata contains the real width/height in pixels of each rendition. The width/height of each rendition is not stored anywhere by default, and to do the automatic detection of the best-matching rendition in an efficient way this information is needed in-place. By default it is generated automatically by a background service, the "wcm.io Media Handler Rendition Metadata Service" (provided that the system configuration is done properly).
However, if you have assets in your system that were present before installing the media handler with the background service, or for any other reason need to repair/update the metadata of already existing assets you can use a AEM Workflow with a custom workflow step provided by the media handler implementation to generate this metadata. The workflows step is also able to work with workflow packages, making it possible to process a bunch or whole subtrees of asset.
The process to use a custom workflow in a workflow package to process a whole subtree of assets is not very intuitive, this article describes the required steps.
This workflow support is available since wcm.io Media Handler 1.6.0. |
How to generate wcm.io Media Handler Rendition metadata for a subtree/multiple folders of AEM assets:
Add a new "Resource Definition" node for each AEM asset folder you want to process, and select the folder path in the properties dialog (e.g. /content/dam/myproject
)
Please note: You have to add at least two resource definition nodes, otherwise it will only work if you selected an asset. Processing of all assets inside a folder including the subfolders works only if you have added at least two resource definition entries (even if they point to the same folder!). The reason for this is a strange special case handling in the AEM workflow resource collection implementation. |
/etc/workflow/packages
or /var/workflow/packages
) go to the jcr:content/vlt:definition/filter
node.root
property, remove the rules
string array property, or change it in a way so it processed all assets in the folder and not only the folder itself.In the Sidekick, select the "Worklow" tab, and select and start the workflow you created in step 1
If you want to see what's going on set a loglevel to INFO for the category |
With this, all assets in the referenced asset folders (and their subfolders) should have a full set of correct wcm.io Media Handler rendition metadata.
|