Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

find unused assets in aem

Avatar

Level 1

Our assets library keeps growing in size and we need to figure out a way of finding all unused assets , then archive / delete them.

Has anyone solved this in aem 5.6?

thanks

1 Accepted Solution

Avatar

Correct answer by
Level 7

Tested in AEM 5.6 with SP2.

You can use the OOTB functionality.

It's necessary to select (from damadmin) the asset that you want to check and select -> tools -> references. In this way you can see if the image is used and in which pages.

The screen below:

View solution in original post

3 Replies

Avatar

Administrator

Hi 

Please have a look at older forum post covering this same topic.

Link:- https://forums.adobe.com/thread/1105276

//You can use http://wemcode.wemblog.com/get_asset_reference_in_page to write your script. First find all Asset using either xpath query (With nodeType as dam:Asset) or iterate through all nodes under /content/dam and then find reference using above code and if reference count is zero then remove that node (Be careful, that non reference node does not mean you will not use it in future). After deleting all asset don't forget to run datastore Garbage collection. Also make sure that you remove all those asset from publish instance as well (Deactivation of those node should do that).

One more reference article:- http://stackoverflow.com/questions/35187627/how-to-find-unused-images-from-cq-dam

// How to find unused images from CQ DAM

 

I hope this will help you.

~kautuk



Kautuk Sahni

Avatar

Correct answer by
Level 7

Tested in AEM 5.6 with SP2.

You can use the OOTB functionality.

It's necessary to select (from damadmin) the asset that you want to check and select -> tools -> references. In this way you can see if the image is used and in which pages.

The screen below:

Avatar

Administrator

---------------------

Not an Answer

---------------------

Adding Good reference articles.

 

If you need to further filter the search, like Find Assets Referenced By Image Components, please refer to article below:-

Link:-  http://stackoverflow.com/questions/35074708/aem-find-assets-referenced-by-image-components

 

If page specific, 

Link:- https://cqwemblog.wordpress.com/2013/12/07/how-to-get-image-dam-reference-from-any-cq5-page/

 

~kautuk



Kautuk Sahni