Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

thumbnail image display in list component

sreedobe
Level 4
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
suchawla
Correct answer by
Level 2
Level 2

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
suchawla
Correct answer by
Level 2
Level 2

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

Nupur_Jain
Community Advisor
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