내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Find all referenced images in DAM from activated/published pages

Avatar

Level 2

@All ,

We have a requirement where we need to find all the referenced assets from published/live pages on our PROD server. we have any analytics available on this or any script or code that can fetch this information

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @nithinthomas 

AEM have internal service (AssetReferenceSearch) to get reference images.

AssetReferenceSearch search = new AssetReferenceSearch(
  jcrNode, DAM_ROOT, request.getResourceResolver()); 

Map<String,Asset> result = search.search();
for (String key: result.keySet()) {
  Asset asset = result.get(key);
  // asset properties
  Sring path = asset.getPath();
  String mimeType = asset.getMimeType();
  ...							
}

Reference:
https://github.com/Adobe-Marketing-Cloud/aem-samples/blob/master/tutorial-referenced-assets/bundle/s... 

Mahedi Sabuj

MS-29LinkedIn

원본 게시물의 솔루션 보기

9 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @nithinthomas 

AEM have internal service (AssetReferenceSearch) to get reference images.

AssetReferenceSearch search = new AssetReferenceSearch(
  jcrNode, DAM_ROOT, request.getResourceResolver()); 

Map<String,Asset> result = search.search();
for (String key: result.keySet()) {
  Asset asset = result.get(key);
  // asset properties
  Sring path = asset.getPath();
  String mimeType = asset.getMimeType();
  ...							
}

Reference:
https://github.com/Adobe-Marketing-Cloud/aem-samples/blob/master/tutorial-referenced-assets/bundle/s... 

Mahedi Sabuj

MS-29LinkedIn

Avatar

Community Advisor

Hi @nithinthomas 

 

There are multiple ways to achieve your requirement. One of the ways is through the referenced asset servlet also you can refer to the below link where it talks about custom java implementation and also on the query builder approach where you can further refine your filtering and get a targeted result.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-find-the-list-of-al...

 

 

 

 

 

Avatar

Community Advisor and Adobe Champion

Hi @nithinthomas ,

 

One of the way would be to use ACS commons MCP tool "Renovator". You can use same 'source' and 'Target' folder and 'select 'Dry Run' checkbox. you can download the excel report and can filter the report with 'references' column as zero.

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp-tools/renovator/index.html

 

Hope it helps!

 

Thanks,

Ritesh Mittal

Avatar

Level 2

Thanks @Ritesh_Mittal @sherinregi @Mahedi_Sabuj  for the response. We want to do this activity on the PROD instance and we cannot do a deployment basically a java change as this point to time. Considering this what is the best next step to try in short time. 

Avatar

Community Advisor

Hi @nithinthomas, You can find the assets reference using reference.json API

http://localhost:4502/libs/wcm/core/content/reference.json?path=contentPath

You need to manually filter type: "asset" to get reference assets only.

Mahedi Sabuj

MS-29LinkedIn

Avatar

Community Advisor and Adobe Champion

Hi @nithinthomas ,

 

Do you have the ACS AEM Commons MCP installed in PROD instance, if yes, then its report generation process.

Avatar

Community Advisor

@nithinthomas  If you have groovy console enabled , then you can also try deriving groovy from the java snippets and try to get the asset list

Avatar

Level 2

You can filter search results based on the various options (predicates), such as, file type, file size, last modified date, status of asset, insights data, and Adobe Stock licensing. You can customize the Filters panel and add or remove search predicates using search facets.

Avatar

Community Advisor

@nithinthomas , Do you have Groovy console installed on your AEM instance?

If yes, you can create a simple groovy script and make use of the ReferenceAggregator API to find all asset references for a given content resource. 

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/index.html?com/adobe/...

 

Hope this helps