Follow

Adobe CQ: Publish Images from Kapost

Learn how to integrate with Adobe CQ/AEM here.

There are two ways to publish images from Kapost to Adobe CQ.  You can either (1) embed images directly in the content you are publishing or (2) include images as attachments to the content you are publishing.   Note: Once an image is published from Kapost, the media file itself will transfer from Kapost to your Adobe CQ instance and will be hosted from there.   You can also configure Kapost to push your images to central Adobe CQ DAM for hosting if desired.

 

Embedding Images

To embed an image in your content directly, click the Insert/Edit Image in Kapost’s WYSIWYG editor.

To publish an embedded images to Adobe CQ, Kapost requires users to configure certain constant settings on the Adobe CQ content type settings page to ensure the embedded images are mapped to the appropriate area within Adobe CQ.  For example, let’s assume we are publishing content to the following slug: content/blog.

 

You will need to set up the following constants:



Path

Value

%slug%/images/jcr:primaryType

nt:unstructured

%slug%/images/%image:name%/jcr:primaryType

nt:unstructured

'%slug%/images/%image:name%/file/jcr:primaryType

nt:file

%slug%/images/%image:name%/file/jcr:content/jcr:primaryType

nt:resource

%slug%/images/%image:name%/file/jcr:content/jcr:data

%image:data%

%slug%/images/%image:name%/file/jcr:content/jcr:mimeType

%image:type%

%slug%/images/%image:name%/title

%image:title%

%slug%/images/%image:name%/caption

%image:caption%

%slug%/images/%image:name%/alt

%image:alt%

 

The first six constants will ensure all embedded images are transferred to an images folder within content/blog in your Adobe CQ instance.  The last three constants will map the title, caption, and alternate text you included within Kapost’s image editor to Adobe CQ.  

 

If additional custom fields are required for embedded images (in addition to title, caption, etc.), users can create custom fields on Kapost’s Settings/Custom Fields page, add them to the Adobe CQ content type, and then create the appropriate mappings for each custom field under the Optional Fields section on the content type settings page.

 

If you want to push images to a central DAM, see Pushing Images to Central DAM below.

 

Attaching Images

 

To attach a featured image, banner image, or other image to your content, click on the Select an Image button.  Note you will need to create a custom image field and add it to your content type to make this button appear.  A separate button is required for each image type you plan to send over (i.e. one for featured image, one for banner, etc.).



To publish attached images to Adobe CQ, Kapost requires users to configure certain constant settings on the Adobe CQ Content Type Settings page to ensure the attached images are mapped to the appropriate area within Adobe CQ.  For example, let’s assume we are publishing content to the following slug: content/blog.  Furthermore, assume we want attached images to appear in a folder called “banner_cq” and the custom field we created in Kapost that stores banner images is called “banner_kapost”

 

You will need to set up the following Constants for each custom field:

 

Path

Value

%slug%/banner_cq/image/jcr:primaryType

nt:file

%slug%/banner_cq/image/jcr:content/jcr:primaryType

nt:resource

%slug%/banner_cq/jcr:primaryType

nt:unstructured

%slug%/banner_cq/image/jcr:content/jcr:mimeType

%image:{banner_kapost}:type%

%slug%/banner_cq/title

%image:{banner_kapost}:title%

%slug%/banner_cq/caption

%image:{banner_kapost}:caption%

%slug%/banner_cq/alt

%image:{banner_kapost}:alt%

 

The first four constants will ensure the attached image from banner_kapost is transferred to the banner_cq folder within content/blog in your Adobe CQ instance.  The last three constants will map the title, caption, and alternate text you included within Kaposts image editor to Adobe CQ.  

 

If additional custom fields are required for embedded images (in addition to title, caption, etc.), users can create custom fields on Kapost’s Settings/Custom Fields page, add them to the Adobe CQ content type, and then create the appropriate mappings for each custom field under the Optional Fields section on the content type settings page.

 

If you want to push images to a central DAM, see Pushing Images to Central DAM below.

 

Pushing Images to Central DAM

 

To publish images to a central DAM within Adobe CQ, Kapost requires users to configure certain constant settings on the Adobe CQ content type settings page to ensure images are mapped to the appropriate area within Adobe CQ.  For example, let’s assume your DAM lives on content/dam/geometrixx-media/blog and your “Parent” field in Kapost is set to content.

 

If you want all images to go to a DAM, you can replace the image constants above with the ones below:

 

Path

Value

dam/geometrixx-media/blog/%image:slug%/jcr:primaryType

dam:Asset

dam/geometrixx-media/blog/%image:slug%/jcr:content/jcr:primaryType

dam:AssetContent

dam/geometrixx-media/blog/%image:slug%/jcr:content/cq:name

%image:name%

dam/geometrixx-media/blog/%image:slug%/jcr:content/cq:parentPath

/content/dam/geometrixx-media/blog

dam/geometrixx-media/blog/%image:slug%/jcr:content/renditions/original/jcr:primaryType

nt:file

dam/geometrixx-media/blog/%image:slug%/jcr:content/renditions/original/jcr:content/jcr:primaryType

nt:resource

dam/geometrixx-media/blog/%image:slug%/jcr:content/renditions/original/jcr:content/jcr:mimeType

%image:type%

dam/geometrixx-media/blog/%image:slug%/jcr:content/renditions/original/jcr:content/jcr:data

%image:data%



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments