find unused assets in aem

Avatar

Avatar
Validate 1
Level 1
siddhartha_chad
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
siddhartha_chad
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
siddhartha_chad
Level 1

07-09-2016

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Level 6
antoniom5495929
Level 6

Likes

91 likes

Total Posts

212 posts

Correct reply

39 solutions
Top badges earned
Establish
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Establish
Level 6
antoniom5495929
Level 6

Likes

91 likes

Total Posts

212 posts

Correct reply

39 solutions
Top badges earned
Establish
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
antoniom5495929
Level 6

10-09-2016

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:

Answers (2)

Answers (2)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

11-09-2016

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

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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

08-09-2016

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