Content Fragment: Possible to use content reference element to pick image rendition? (AEM 6.4)
Hello,
We have a set of content fragment templates with content reference fields that allow you to select images.
Sample config:
<imageField jcr:primaryType="nt:unstructured" sling:resourceType="dam/cfm/models/editor/components/contentreference"
fieldLabel="Image"
listOrder="21"
filter="hierarchy"
metaType="reference"
name="imageRef_image"
nameSuffix="contentReference"
renderReadOnly="false"
showEmptyInReadOnly="true"
valueType="string"/>
When interacting with this field, I can select the image just fine, but is there a way to select one of the image renditions (located at IMAGE/jcr:content/renditions/)? For some background, we have a servlet that returns content fragments as JSON. The image field on this response ends up being a reference to the original image, but we are trying to figure out a way to reference a particular resolution/rendition of the original.
Interesting enough, if I select an image in the content reference field, and then add /jcr:content/renditions to the text field, the reference window will then show some of those available renditions. Just trying to figure out how to expose these by default.
Thanks.