Hi All,
Using JCR API i want to fetch the value of thumbnail image of a Asset.
Purpose.
I am trying to display the thumbnail image of a Book in the main page and on click of it i will display the complete details including the main image of the Book.
I tried to fetch the data from under imagenode/rendition folder.
Thanks in Advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Try:
Resource resource = resourceResolver.getResource("/content/dam/Rental/prod1.gif");
Notice the / in the beginning of the resource path.
/Ove
Views
Replies
Total Likes
Use Asset API [0]. Example at [1]
[0] https://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/Asset.html
[1] http://helpx.adobe.com/experience-manager/using/aem-dam-image-components.html
Views
Replies
Total Likes
Tried in the following way
ResourceResolver resourceResolver = resolverFactory.getAdministrativeResourceResolver(null);
Resource resource = resourceResolver.getResource("content/dam/Rental/prod1.gif");
Asset asset = resource.adaptTo(Asset.class);
Rendition thumb = asset.getRendition("cq5dam.thumbnail.48.48.png");
getting a null pointer exception in line 3 (Asset asset = resource.adaptTo(Asset.class);)
Image is available in the Asset able to access the metadata using JCR API.
Views
Replies
Total Likes
Try:
Resource resource = resourceResolver.getResource("/content/dam/Rental/prod1.gif");
Notice the / in the beginning of the resource path.
/Ove
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies