Where to place a component's image assets and how to access them on the page? | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

Where to place a component's image assets and how to access them on the page?

  • October 16, 2015
  • 2 replies
  • 1021 views

Hi,

I have a component that has a couple of images. These images are not customizable and are always the same. Where should I place these images?

Should I place it in the component folder's clientlibs directory (e.g. /apps/example/components/my-component/clientlibs) or should I place them in another folder? My concern about placing it in the clientlibs folder next to the app, is that folder is not permitted to be read by anonymous user on the publish instance.

Also how can I reference the images in my JSP file?

<img src="...">

Thanks in advance.

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 smacdonald2008

Its best practice to place your images in the DAM and use the image component to display the images. 

You can also create a custom image component that displays DAM images:

http://helpx.adobe.com/experience-manager/using/aem-dam-image-components.html

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Its best practice to place your images in the DAM and use the image component to display the images. 

You can also create a custom image component that displays DAM images:

http://helpx.adobe.com/experience-manager/using/aem-dam-image-components.html

Sham_HC
Level 10
October 16, 2015

You can place it in dam Or set glob permission to access from apps component image location.