For Asset Compute workers to generate custom renditions in AEM as a Cloud Service, they must be registered in AEM as a Cloud Service Author service via Processing Profiles. All assets subject to that Processing Profile will have the worker invoked upon upload or re-processing, and have the custom rendition generated and made available via the asset’s renditions.
First create a new Processing Profile that will invoke the worker with the configurable parameters.
WKND Asset Renditions
Circle
png
png
as this is the supported output format the worker’s web service supports, and results in transparent background behind the circle cut out.https://...adobeioruntime.net/api/v1/web/wkndAemAssetCompute-0.0.1/worker
aio app get-url
. Ensure the URL points at the correct workspace based on the AEM as a Cloud Service environment.size
1000
contrast
0.25
brightness
0.10
rendition.instructions
JavaScript object.image/jpeg
, image/png
, image/gif
, image/bmp
, image/tiff
Leave blank
Select the newly created Processing Profile, WKND Asset Renditions
Tap Apply Profile to Folder(s) in the top action bar
Select a folder to apply the Processing Profile to, such as WKND
and tap Apply
Navigate to the folder the Processing Profile was not applied to via AEM > Assets > Files and tap into WKND
.
Upload some new images assets (sample-1.jpg, sample-2.jpg, and sample-3.jpg) in any folder under the folder with the Processing Profile applied, and wait for the uploaded asset to be processed.
Tap the asset to open its details
Open the Renditions view from the left sidebar
Tap on the asset named Circle.png
and review the generated rendition
Congratulations! You have finished the tutorial on how to extend AEM as a Cloud Service Asset Compute microservices! You should now have the ability to set up, develop, test, debug and deploy custom Asset Compute workers for use by your AEM as a Cloud Service Author service.
The final Asset Compute project is available on Github at:
Github contains is the final state of the project, fully populated with the worker and test cases, but does not contain any credentials, ie. .env
, .config.json
or .aio
.