Exposing DAM images to external applications | Community
Skip to main content
Level 2
July 13, 2023
Solved

Exposing DAM images to external applications

  • July 13, 2023
  • 4 replies
  • 1371 views

We are trying to load DAM images through an external application. 

 

We provided Anonymous user , an access to the DAM folder and Apache Sling Authentication service configuration was updated to ignore the authentication for the DAM folder.

 

Upon trying to load the image externally within image source <img src="DAM URL PATH"> the image does not load.

 

Please help suggest.

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 DPrakashRaj

As per your explanation you are trying to consume assets from aem author on 3rd party application which won’t be recommended if you have publisher and dispatcher setup for your environment.

With those authentication in place how are you accessing the image via image source.

best way is to use the assets from dispatcher/CDN location.

4 replies

Ravi_Pampana
Community Advisor
Community Advisor
July 13, 2023

Hi,

Are you able to see the images in DAM and available for drag and drop to image component? What is the url for the image? 

Check whether there are any permissions added to the image to render. 

Mahedi_Sabuj
Community Advisor
Community Advisor
July 13, 2023
EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 13, 2023

You must expose the images through the dispatcher, which means the images need to be activated (published) and there should be filters accordingly in the dispatchers to allow access to them.

Esteban Bustamante
DPrakashRaj
Community Advisor
DPrakashRajCommunity AdvisorAccepted solution
Community Advisor
July 13, 2023

As per your explanation you are trying to consume assets from aem author on 3rd party application which won’t be recommended if you have publisher and dispatcher setup for your environment.

With those authentication in place how are you accessing the image via image source.

best way is to use the assets from dispatcher/CDN location.

Level 2
July 14, 2023

Admin , Please unmark above answer as correct as it’s unrelated to the issue -

 

The error on browser is Cross-Origin Read Blocking (CORB) blocked cross origin response with MIME text/HTML 

 

Are there any specific configurations related to this we need to do on AEM for images to show up ? 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 14, 2023

If you use the images directly in the HTML you won't have any CORS issues, but if you are calling through JS then you may have issues with CORS, that's not specified in your question, please refer to this for understanding how to solve CORS issues: https://www.albinsblog.com/2018/08/how-to-enable-cross-origin-resource-sharing-support-in-aem.html 

Esteban Bustamante