I have an image drag and drop field. Upon dragging image i want the image alternative text to be inherited from DAM and show up in the dialog field below. How to go about this? Any help appreciated
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Pleben , similar functionality is implemented in AEM Core Components - Image. Maybe you can reuse it or copy to you custom implementation?
Here is the git repository link - https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wc....
Views
Replies
Total Likes
Hi @Pleben
You will need to add a custom js to the component, that reads the path of the added image, gets its resource, reads the text and writes in the dialog.
This is how you can add that custom clientlib to your component: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-add-a-js-file-to-a-...
In your js you can make an Ajax call to a custom servlet of yours, pass on the image path. The servlet will do the lookup for the text and return it to your js. The js will find the dialog field and write the text into it.
Views
Replies
Total Likes
You can fetch the asset’s alt text Metadata from DAM (for Example, using Query Builder) and then populate the alt text in the dialog field using JS
Views
Replies
Total Likes
Hi @Pleben , similar functionality is implemented in AEM Core Components - Image. Maybe you can reuse it or copy to you custom implementation?
Here is the git repository link - https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wc....
Views
Replies
Total Likes
Views
Likes
Replies