Workflows - Is it Possible to Manipulate the Original Image/Asset Rather than Create a Rendition? | Community
Skip to main content
Level 3
May 31, 2023
Solved

Workflows - Is it Possible to Manipulate the Original Image/Asset Rather than Create a Rendition?

  • May 31, 2023
  • 2 replies
  • 1044 views

Hello,

I am needing to create a Workflow that automatically resizes an Asset upon upload if it is above a particular size. I understand how to create "Renditions", but I need to be able to provide transformations (using the CommandLine or other Step) on the original image. Is this possible? If so, how can it be achieved?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ShubhanshuSi2

@kmarchewa. If you are on cloud service, you can utilize the transformation capability provided by Web Optimized Image Delivery.
In general, it is not a good idea to replace the original binary of the image unless you are creating a new version itself, as it leads to inconsistency between renditions and the original binary.

You may look for options supporting transformations on the fly. 
1. Recommend you to explore Dynamic media to support transformation use case. example for flip: https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-serving-api/http-protocol-reference/command-reference/r-flip.html?lang=en

2. Named Image Transformation Servlet: Named Transform Image Servlet (adobe-consulting-services.github.io)

2 replies

rawvarun
Community Advisor
Community Advisor
May 31, 2023

You need to create a workflow which takes the original image and then converts the image to a specific dimension based on some rule. Also, you need to disable the DAM Update Asset workflow in the launcher.

KMarchewaAuthor
Level 3
May 31, 2023

Thanks for the response. I understand the how to create a Workflow that will process the image. However, I cannot figure out how to make the Workflow actually replace the original image. For example, if I configure the "CommandLine" Step with the following process arguments: "convert ${file} -flip ${file}" I would expect the original image to get flipped when the Workflow runs. However, this is not the case; the original image is not modified. Yet if I passed the following: `convert ${directory}/${filename} -flip ${directory}/${basename}_flipped.jpg` a Rendition gets created. How do I replace the original image? Using the same filename (as in the first example) does not work as expected.

 

Thanks.

ShubhanshuSi2Community AdvisorAccepted solution
Community Advisor
June 1, 2023

@kmarchewa. If you are on cloud service, you can utilize the transformation capability provided by Web Optimized Image Delivery.
In general, it is not a good idea to replace the original binary of the image unless you are creating a new version itself, as it leads to inconsistency between renditions and the original binary.

You may look for options supporting transformations on the fly. 
1. Recommend you to explore Dynamic media to support transformation use case. example for flip: https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-serving-api/http-protocol-reference/command-reference/r-flip.html?lang=en

2. Named Image Transformation Servlet: Named Transform Image Servlet (adobe-consulting-services.github.io)