Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

AEM assets expiry dates

Avatar

Level 4

Hi Everyone

 

I'm looking for some guidance on how to enhance our AEM Assets implementation. We have a large number of assets under the /content/dam/xxx path, and it's becoming challenging to track their expiry dates effectively. My goal is to implement a visual indicator—either a flag or an icon—on each asset within the AEM Assets interface that would dynamically appear when an asset's expiry date is within a certain threshold.

Specifically, I want to achieve the following:

  • When assets are loaded in /content/dam/xxx, the system should check each asset's expiry date (if one is set).
  • If an asset's expiry date is within the next 5 days, a visual flag or icon should be displayed on the asset's thumbnail or metadata area in the AEM Assets interface.
  • Ideally, the flag or icon would disappear once the asset is no longer within the 5-day expiry window.

Any suggestions please

 

Thanks in advance

4 Replies

Avatar

Community Advisor

Hi @Prashardan,

This sounds like a very useful feature to improve the management of assets within AEM Assets (You could add this into the Idea's section of the community), especially when dealing with expiration dates. Below, I could share a few possible ways to approach this, leveraging AEM’s capabilities such as custom metadata, workflow, and frontend modifications.

1. Add Expiry Date Metadata to Assets (if not already done)

Ensure each asset has an "expiry date" stored as metadata. If your assets don’t already have an expiry date, you can create a custom metadata field for it.

  • Method: You can add the expiryDate metadata field using a custom workflow or through bulk editing in AEM Assets.

  • Type: This metadata can be added as a Date field.

2. Custom Workflow to Update Expiry Status

You can create a custom workflow in AEM that periodically checks assets for their expiry dates. The workflow could trigger a custom metadata update that marks whether an asset is within the 5-day expiry window.

  • Steps:

    1. Custom Workflow Process: Create a custom workflow process that runs periodically (e.g., daily) and checks the expiry dates of assets in the /content/dam/xxx folder.

    2. Update Metadata: If an asset’s expiry date is within the next 5 days, update the metadata or set a flag field (e.g., expiryStatus) to "expiring" or similar.

    3. Trigger the Workflow: You can either trigger the workflow manually or set up a scheduled job to run the workflow periodically.

3. Display a Visual Indicator in the AEM Assets Interface

You can implement a custom component or use AEM’s client-side customization to dynamically display a visual indicator (like a flag or icon) on the asset’s thumbnail when the expiryStatus flag is set to "expiring".

  • Option 1: Using a Custom Overlay or Icon on Thumbnails

    • Client-side: A custom JavaScript or CSS overlay can be added to the AEM Assets interface to check the metadata for each asset and display a flag/icon if the expiryStatus field is "expiring."

    • How to implement:

      1. Custom JavaScript: Add custom JavaScript to AEM’s DAM interface (via a clientlib or custom frontend code).

      2. Query Metadata: When assets are loaded in the AEM Assets UI, use the AEM API (or Asset Manager) to query each asset’s expiryStatus.

      3. Conditionally Show Icon: If the asset’s expiryStatus is "expiring" (or if the expiry date is within 5 days), display an overlay icon or flag on the asset’s thumbnail.

  • Option 2: Using AEM Asset's Metadata: If you’re looking to keep it simple, you can also modify the asset’s metadata view in the AEM interface to show a visual flag or indicator based on the expiry date field.

    • This can be done using JCR Queries and custom JSP components to render a flag icon next to the asset’s metadata in the UI.

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Community Advisor

Hi @Prashardan ,
Try below steps:

Avatar

Community Advisor

@Prashardan : Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!


Aanchal Sikka

Avatar

Level 4

Hi @AmitVishwakarma 

 

Thanks for your reply. I have tried you suggested.

 

I have overlayed /libs/dam/gui/coral/components/admin/contentrenderer/card/asset/propertyList.jsp to /apps/dam/gui/coral/components/admin/contentrenderer/card/asset/propertyList.jsp

 

I have a dc:expiry in metadata and want to read this property and when date is >= currentdate I want show the flag/icon.

Currently I am able to show icon but unable to read dc:expiry in the /apps/dam/gui/coral/components/admin/contentrenderer/card/asset/propertyList.jsp

 

Kindly advise.

 

CC: @SantoshSai @aanchal-sikka