I agree with lasling . To add to that adding below a snippet from one
of my project (modified accordingly, Please make sure to use constants
in a seperate class.)As a part of our requirement , we passed the node
to get the asset and fetched the required rendition accordingly. Why the
rendition is set in the above manner is because, when this is published
via dispatcher , assume your rendition path is
/content/dam/geometrixx/documents/GeoCube_Datasheet.pdf/jcr:content/renditions/cq5dam.thumbnail...