Hi ,
We are trying to implement the functionality to search images in DAM based on image size as search critera . But i was not able to find the details of image size under 'metadata' node of an image in CRX .
1.Can someone let me know , where the image size details are stored in CRX ?
2. How to add search functionality for image size ?
Thanks in advance
Prabhu
Solved! Go to Solution.
Views
Replies
Total Likes
* It should be stored under metadata. Probably your asset has wrong meta data set Ex:- tiff:ImageWidth, tiff:ImageLength set to zero instead of actual size. Check with image generated camera or source that proper metadata is set. If you feel meta data is set correctly file a daycare will validate.
* http://dev.day.com/docs/en/cq/current/dam/extending-cq-dam-search.html should help to extend search.
Views
Replies
Total Likes
* It should be stored under metadata. Probably your asset has wrong meta data set Ex:- tiff:ImageWidth, tiff:ImageLength set to zero instead of actual size. Check with image generated camera or source that proper metadata is set. If you feel meta data is set correctly file a daycare will validate.
* http://dev.day.com/docs/en/cq/current/dam/extending-cq-dam-search.html should help to extend search.
Views
Replies
Total Likes
Thanks Sham . I figured it out , the image details are stored under metadata/dam:size property .
For extending search , i need to create a custom facet to search dam based on asset size .
1. What is the best approach to create a custom facet ?
I tried overlaying /libs/cq/ui/widgets/source/widgets/wcm/PropertyPredicate.js and customized the Propertypredicate.js javascript as per my requirement .
2.Now , I need to create JCR Predicate expression to genarate XPATH query . Please find a sample predicate expression
http://localhost:4502/libs/cq/search/content/querydebug.html
type=dam:Asset
property=jcr:content/metadata/dam:size
property.value = 42018
How to add operators to the predicate expression to generate below XPATH
//element(*, dam:Asset)
[
jcr:content/metadata/@dam:size<42018
]
I need to search for assets with size less than 42018 Bytes
Views
Replies
Total Likes