Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

thumbnail image display in list component

Avatar

Level 4

Hi,

 

Enviroment: AEM 6.5

I am doing following to get a thumbnail of page.

<img src="${item.path}.thumb.140.100.png">

I am not sure, if this best practice to get a thumbnail of page display on list component.

Please suggest. ( Use case : All article pages - will be displayed as tiles using list component)

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi @sreedobe It would be best that you refer core components for reference and use style system to achieve your use case.

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi @sreedobe It would be best that you refer core components for reference and use style system to achieve your use case.

 

 

Avatar

Community Advisor

Hi @sreedobe 

 

In my opinion, the way you are getting the page thumbnail is the best way to get it. As this call to page thumbail, takes care of all fallbacks required if the page does not consist of its own thumbnail. The thumbnail is returned for the page in the following order:

1. if page has its own thumbail i.e image node under jcr:content node of page, that is returned

2. if above does not present, it goes to page template and get page template thumbnail. It means you can set default thumnail of page as template thumnail

3. if above does not exist, return thumbnail exists on "/libs/cq/ui/widgets/themes/default/icons/240x180/page.png"

 

There is a servlet that takes care of this logic "com.day.cq.wcm.core.impl.servlets.ThumbnailServlet"

 

Thanks!

Nupur