Customize OOTB Core Image Component | Community
Skip to main content
Level 2
December 22, 2022
Solved

Customize OOTB Core Image Component

  • December 22, 2022
  • 2 replies
  • 935 views

Hi,

 

We are using the OOTB Image Core component and when we try to use this component on the page, the image src is referencing the image component path of the current page. 

Instead, is there a way to load the images from /content/dam (/content/dam/wknd/hiking-campaign.jpeg) instead of the page URL (/content/wknd/language-masters/en/_jcr_content/root/container/image.coreimg.60.100.jpeg/1671724313161/hiking-campaign.jpeg)?

 

Our requirement is to load the images from the content dam without losing the dynamic renditions and versioning features of the OOTB core image component. 

 

Is there any option to achieve our requirement without many customizations?

 

Is there any reason to load the image from the page component URL instead of the DAM URL?  

 

Thanks,

Swapna

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

Hello @swapnana 

 

It should be possible to load the images via "/content/dam". 

But, you would have to customize both Image component and Adaptive Image servlet

They depend on fetching Image info from "fileReference" property of component.

 

Secondly, if you are utilizing features like "Resize Width" of Image component policy, then you would not be able to readily use it without customization

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/wcm-components/image.html?lang=en#design-dialog

2 replies

Kiran_Vedantam
Community Advisor
Community Advisor
December 22, 2022

Hi @swapnana 

 

Can you please share more details like the AEM version, core components version, the type of instance that you were looking for (author/publish), etc.?

 

Thanks,

Kiran Vedantam.

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
December 23, 2022

Hello @swapnana 

 

It should be possible to load the images via "/content/dam". 

But, you would have to customize both Image component and Adaptive Image servlet

They depend on fetching Image info from "fileReference" property of component.

 

Secondly, if you are utilizing features like "Resize Width" of Image component policy, then you would not be able to readily use it without customization

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/wcm-components/image.html?lang=en#design-dialog

Aanchal Sikka