Expand my Community achievements bar.

SOLVED

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

Avatar

Level 7

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 10

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