Publishing pages with AEM Assets

When editing content for the Universal Editor, you of course can select assets from AEM Assets. When you publish your content to Edge Delivery Services, the related AEM Assets content is published as well.

To ensure this seamless behavior, AEM and Edge Delivery Services must have proper access to AEM Assets in order to publish, and the assets, especially images and videos, must adhere to the limits of Edge Delivery. This includes:

This document describes how to configure these two points.

Ensuring assets folders are accessible

When publishing pages from AEM to Edge Delivery Services, a technical account is used. This account, with a name in the format <hash>@techacct.adobe.com, is created automatically as a user in AEM by Cloud Manager whenever you first publish a page created with the Universal Editor.

When you upload assets to a folder in AEM Assets, these will be accessible to this technical account by default, as long as you don’t make the folder private. If you use private asset folders, make sure you grant access to the folder to the technical account.

Assigning a Proper Configuration to an Asset Folder

Generally assuring that your technical account has read access to your assets in AEM Assets is sufficient for publishing your assets along with your pages to Edge Delivery Services.

Any asset is published at its individual path automatically to the Edge Delivery Services sites they are used on, as long as the path to the asset folder is included in the site’s path mapping. For example, a PDF /content/dam/site/en/terms-of-use.pdf used in a multi-regional site will automatically be published to site.co.uk and site.eu if they both include the path /content/dam/site/en/ in their respective path mapping, and reference the asset on any page.

Additional configuration is needed, however, when you want to publish assets to a site individually, that are not referenced by a site.

To support both this use case, a configuration must be assigned to the AEM Assets folder.

  1. Sign into your AEM authoring environment.
  2. Under Sites select the site where you are publishing your assets or the site with which the assets will be associated.
  3. Tap or click Properties in the tool bar.
  4. On the Advanced tab in the properties window, take note of the configuration in the field Cloud Configuration.
    • This is created automatically when you create your site in the format /conf/<site-name>.
  5. Tap or click Cancel in the properties window and navigate to AssetsFiles and select your AEM Assets folder.
  6. Tap or click Properties in the tool bar.
  7. On the Cloud Services tab of the properties window, in the Cloud Configuration field, select the same configuration as you noted previously.
  8. Tap or click Save & Close.

Resizing Assets to be within Supported Limits of Edge Delivery Services

AEM Assets supports assets in various formats and sizes, possibly being too big to be reasonably served as web-optimize renditions. Edge Delivery Services, however, enforces limits on which formats, image and video sizes are supported.

To guarantee a seamless integration of AEM Assets with Edge Delivery Services, the assets can either be downscaled by content creators locally and uploaded to AEM Assets in the supported size, or a processing profile can be used to prepare the asset to be used for Edge Delivery.

In the latter case AEM Assets will create static renditions that will automatically be used instead of the original asset, when the original asset exceeds the supported limits.

Creating a Processing Profile

  1. Sign in to your AEM authoring environment
  2. Under Tools navigate to Assets and select Processing Profiles
  3. Tap or click Create to create a new processing profile or select an existing one and tap or click on Edit
  4. Add two image renditions to the processing profile: edge-delivery-services-jpeg with the extension jpeg and the edge-delivery-services-png with the extension png.
  5. Configure a maximum width and height to 2000x2000 pixels for both, and a quality of 100 for the jpeg rendition.
  6. Configure the included mime type to image/jpeg for the jpeg rendition, and to image/png for the png rendition respectively.
  7. Tap or click Save

You can follow the same steps to add a video rendition to downscale and downsample videos as well.

  1. Select the previously created processing profile in the overview, and tap or click Edit
  2. In the wizard, navigate to the Video tab
  3. Add a rendition called edge-delivery-services-mp4 and select the mp4 extension
  4. Configure the Bitrate to be 300 and (optionally) set a reasonable width for your intended use case
  5. Tap or click Save

Assigning the Processing Profile to an Asset Folder

To use the previously created processing profile, it has to be assigned to an asset folder and the assets within that folder have to be reprocessed.

  1. Under Assets tap or click on Files
  2. Navigate to the folder that contains your assets and select it
  3. Tap or click Properties
  4. Navigate to the Asset Processing tab
  5. In the field set Processing Profile, select the previously created processing profile
  6. Tap or click Save & Close

Every new asset uploaded to this folder or any sub folder will be processed using the assigned processing profile, and the Edge Delivery Services specific asset renditions will be generated. Existing assets, however, have to be reprocessed.

Troubleshooting

I am getting an error message that some images exceed the allowed limit of 10 MB

Edge Delivery Services enforces limits to the published content. Publishing content that exceeds these limits fails. Follow the steps above to resize your images.

I am getting an error message that an asset.jpg cannot be previewed because it is of type image/png

Edge Delivery Services enforces that images have to be published with an extension matching the type of the image. A JEPG for example has to be published with a .jpg or .jpeg extension, and a PNG has to be published with a .png extension. To resolve this issue, simply rename the image so that the extension matches the type of the image.

I am getting an error message that an image.webp is not a supported file type

While Edge Delivery Services serves web-optimized images as WEBP when a browser supports this image format, it does not support the upload of such images. To resolve this issue, simply reupload the image with one of the supported image file types.