Hi all,
We get a lot of requests from our customers to deliver assets with different, customer specific filename conventions (e.g. PRODUCTID_SHOTCODE.jpg), which isn't the name we give the files in AEM Assets. This applies to images, files etc.
I've gone through the Image Serving API for dynamic media (https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...) but can't find anything in there that suggests how to do this. Essentially, I want to be able to do something like:
https://s7d1.scene7.com/is/image/3m/Cat?crop=100,100,300,300&downloadFilename=croppedcat.jpg
This would allow us to build other integrations with our product catalogue and data syndication tools to mass download assets with the right names by default, prior to sending to customers, rather than having to download everything and then run a rename script.
Does anyone know if this is possible?
Thanks!
Paul.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Paul,
Welcome to Adobe Community !!
URL transformation is possible when you have applied rulesets on that configured Dynamic Media account (on your AEM Assets Author)
Detailed information available here : https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/using-rulesets-to-trans...
In case you need example for rulesets and how they are created, please refer to this document : https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...
Note : Please test rulesets on a Dynamic Media Staging environment or a test account on your Dynamic Media Production environment.
Thanks,
Vikram Gaur
Hi Paul,
Welcome to Adobe Community !!
URL transformation is possible when you have applied rulesets on that configured Dynamic Media account (on your AEM Assets Author)
Detailed information available here : https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/using-rulesets-to-trans...
In case you need example for rulesets and how they are created, please refer to this document : https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...
Note : Please test rulesets on a Dynamic Media Staging environment or a test account on your Dynamic Media Production environment.
Thanks,
Vikram Gaur
Thank you @Vikram_Gaur_ , that's really helpful! If I'm reading it correctly, this says that we could supply a specific URL parameter and use that to reformat the response URL, e.g. with the example
https://s7d1.scene7.com/is/image/3m/Cat?crop=100,100,300,300&downloadFilename=croppedcat.jpg
<rule> <expression>#CLEVER_REGEX_TO_FIND_"downloadFilename"_AND_PULL_QUERY_PARAMETER_"croppedcat.jpg"#</expression> <substitution>#REPLACE_FILENAME_WITH_"croppedcat.jpg"#</substitution> </rule>
Is that right, i.e. we can program the rulesets to do something specific if we deliver a specific URL structure?
Thanks,
Paul.
Hi Paul
That looks good.
You just have to create a "CLEVER_REGEX" now.
For example myCat/myImage/small would translate to myCat/smallTemplate?src=myCat/myImage
Using this rule :
<rule> <expression>([^/]+)/(small|medium|large)$</expression> <substitution>$2Template?src=sample/$1</substitution> </rule>
Thanks,
Vikram Gaur
Views
Likes
Replies