Where to place a component's image assets and how to access them on the page? | Adobe Higher Education
Skip to main content
LinearGradient
Level 6
October 16, 2015
Répondu

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

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.

Ce sujet a été fermé aux réponses.
Meilleure réponse par 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 commentaires

smacdonald2008
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.