Experience League | Image

Getting Started with Dynamic Media

Speaker : Andrew Hathaway & Alex Thiers

Table of Contents

Lab Overview

Using a single master asset, workshop participants will learn best practices for creating optimized delivery settings for a range of image sizes and formats for websites and mobile screens. Discover the best way to compress images to optimize both image quality and download speed, balancing compression settings, image fidelity, sharpening options and file format choices. Use Adobe Smart Crop, driven by Sensei, to automatically and intelligently create cropped iterations of image files. Finally, we’ll explore how to leverage these tools on a page built using AEM Sites

Key Takeaways

  • Optimize image sharpening and compression across multiple images
  • Design optimal cropping ratios for Smart Crop automation
  • Use Dynamic Media viewers and settings in Adobe Experience Manager components


You need all these things:

  • AEM 6.4 (or newer) & Dynamic Media
  • Provisioned with DMS7 credentials
  • Web Browser of choice

Lesson 1 – Image Presets

Lesson Context

Optimizing image quality can be a time consuming process as many factors contribute to rendering acceptable results. The outcome is partly subjective because individuals perceive image quality differently. Structured experimentation is key.

AEM includes more than 100 dynamic media image delivery commands for tuning and optimizing images and rendering results. The following guidelines can help you streamline the process and achieve good results quickly using some essential commands and best practices.


Image Presets enable AEM Assets to dynamically deliver images at different sizes, in different formats, or with other image properties there are generated dynamically. Each Image Preset represents a predefined collection of sizing and formatting commands for displaying images. When you create an Image Preset, you choose a size for image delivery. You also choose formatting commands so that the appearance of the image is optimized when the image is delivered for viewing.

Administrators can create presets for exporting assets. Users can choose a preset when they export images, which also reformats images to the specifications that the administrator specifies.

You can also create image presets that are responsive. If you apply a responsive image preset to your assets, they change depending on the device or screensize they are viewed on.

You can configure image presets to use CMYK in the color space in addition to RGB or Gray.

This section describes how to create, modify, and generally manage image presets. You can apply an image preset to an image anytime you preview it.

Additional documentation: https://helpx.adobe.com/experience-manager/6-4/assets/using/best-practices-for-optimizing-the-quality-of-your-images.html

Exercise 1.1: Review an Image Preset

  1. Navigate to Assets>Files>Summit 2019; Select the folder corresponding to your station number; 1a. Click on any image in the “Image Presets” folder, Choose Renditions from the left nav menu.

  1. Select a Dynamic Rendition

  1. Right Click on the image and View Image Info

  2. Notice the image size in Kilobytes, KB

Note: Adobe Photoshop Save For Web allows for similar controls to affect image size, sharpness and file size, on single images.

Exercise 2: Create an Image Preset (H3)

  1. Navigate to Image Presets (Click on the AEM Icon in the upper left corner); Choose Tool Icon, Click Assets, click Image Presets

  1. Select “Medium”

  1. Change Quality setting to 5

  1. Right-Click on image and get image info.

  2. Right-Click on image and Copy Image Address, Paste into new browser window

  1. Exit editing window

  2. Create a new Image Preset

  3. Name it **Mediumsharp_+*your station number - ***Example: “Mediumsharp_Station_1”

  4. Leave pixels at 500 x 500

  5. Change Quality to 50

  6. Choose Advanced Tab

  7. Set “Sharpening” to Unsharp Mask

  8. Click Save button

  1. Create a new Image Preset

  2. Name it “Greenbkgd_Station-Number” - EXAMPLE: “Greenbkgd_Station-1”

  3. Select “Advanced Tab”, in Modifier field type “bgc=40,100,40

  1. Click Save

Additional Notes

  • JPG or PNG are the best choices to deliver images in good quality and with manageable size and weight.
  • If no format command is supplied in the URL, Dynamic Media Image Delivery defaults to JPG for delivery.
  • JPG compresses at a ratio of 10:1 and usually produces smaller image file sizes. PNG compresses at a ratio of about 2:1, except in some cases, such as when images contain a white background. Typically though, PNG file sizes are larger than JPG files.
  • JPG uses lossy compression, meaning that picture elements (pixels) are dropped during compression. PNG on the other hand uses lossless compression.
  • JPG often compresses photographic images with better fidelity than synthetic images with sharp edges and contrast.
  • If your images contain transparency, use PNG because JPG does not support transparency.

As a best practice for image format, start with the most common setting &fmt=JPG.

Best Practices for Image Size

Dynamically reducing image size is one of the most common tasks. It involves specifying the size and, optionally, which downsampling mode is used to downscale the image.

  • For image sizing, the best and most straightforward approach is to use &wid=<value> and &hei=<value>, or just &hei=<value>. These parameters automatically set the image width in accordance to the aspect ratio.
  • &resMode=<value> controls the algorithm used for downsampling. Start with &resMode=sharp2. This value provides the best image quality. While using the downsampling value =bilin is faster, it often results in the aliasing of artifacts.

As a best practice for image sizing, use &wid=<value>&hei=<value>&resMode=sharp2 or &hei=<value>&resMode=sharp2

Best Practices for Image Sharpening

Image sharpening is the most complex aspect of controlling images on your website, and where many mistakes are made.

With AEM, you can sharpen images on ingestion, on delivery, or both. In most cases, however, you should sharpen images using only one method or the other, but not both. Sharpening images on delivery, on a URL, typically gives you the best results.

There are two image sharpening methods that you can use:

  • Simple sharpening (&op_sharpen) - Similar to the sharpen filter used in

Photoshop, simple sharpening applies basic sharpening to the final view of the image following dynamic resizing. However, this method is not user-configurable. The best practice is to not use &op_sharpen unless required.

  • Unsharp masking (&op_USM) - Unsharp masking is an industry standard sharpening filter. The best practice is to sharpen images with unsharp masking following the guidelines below. Unsharp masking lets you control the following three parameters:
  • &op_sharpen=amount,radius,threshold
    • amount (0-5, strength of the effect.)
    • radius (0-250, width of the “sharpening lines” drawn around the sharpened object, as measured in pixels.)
  • Keep in mind that the parameters radius and amount work against each other. Reducing radius can be compensated by increasing amount. Radius allows finer control as a lower value sharpens only the edge pixels, whereas a higher value sharpens a wider band of pixels.

    • threshold (0-255, sensitivity of effect.)
  • This parameter determines how different the sharpened pixels must be from the surrounding area before they are considered edge pixels and the filter sharpens them. Threshold helps to avoid over-sharpening areas with similar colors, such as skin tones. For example, a threshold value of 12 ignores slight variations in skin tone brightness to avoid adding “noise”, while still adding edge contrast to high contrast areas, such as where eyelashes meet skin.

    • For more information about how you set these three parameters, including best practices to use with the filter, see the following resources:

AEM Help topic on Sharpening an image.

Best practices white paper Sharpening images in Adobe Scene7 Publishing System and on Image Server.

AEM also lets you control a fourth parameter: monochrome (0,1). This parameter determines if unsharp masking is applied to each color component separately using the value 0 or to the image brightness/intensity using the value 1.

As a best practice, start with the unsharp mask radius parameter. Radius settings that you can start with are the following:

  • Website: 0.2-0.3 pixels
  • Photographic printing (250-300 ppi): 0.3-0.5 pixels
  • Offset printing (266-300 ppi): 0.7-1.0 pixels
  • Canvas printing (150 ppi): 1.5-2.0 pixels

Gradually increase the amount from 1.75 to 4. If sharpening is still not the way you want, increase the radius by a decimal point and run the amount again from 1.75 to 4. Repeat as necessary.

Leave the monochrome parameter setting at 0. Best practices for JPEG compression (&qlt=)

  • This parameter controls JPG encoding quality. A higher value means a higher- quality image but a large file size; alternatively, a lower value means a lower quality image but a smaller file size. The range for this parameter is 0-100.
  • To optimize for quality, do not set the parameter value to 100. The difference between a setting of 90 or 95 and 100 is almost imperceptible, yet 100 unnecessarily increases the size of the image file. Therefore, to optimize for quality but avoid image files becoming too large, set the qlt= value to 90 or 95.
  • To optimize for a small image file size but keep image quality at an acceptable level, set the qlt= value to 80. Values below 70 to 75 results in significant image quality degradation.
  • As a best practice, to stay in the middle, set the qlt= value to 85 to stay in the middle.
  • Using the chroma flag in qlt=
  • The qlt= parameter has a second setting that lets you turn on RGB chromaticity downsampling using the value ,1 or off using the value ,0.
  • To keep it simple, start with RGB chromaticity downsampling turned off (,0). This setting usually results in better image quality, especially for synthetic images with lots of sharp edges and contrast.

As a best practice for JPG compression use &qlt=85,0. Best practices for JPEG sizing (&jpegSize=) jpegSize is a useful parameter if you want to guarantee that an image does not exceed a certain size for delivery to devices that have limited memory.

  • This parameter is set in kilobytes (jpegSize=<size_in_kilobytes>). It defines the maximum allowed size for image delivery.

  • &jpegSize= interacts with the JPG compression parameter &qlt=. If the JPG response with the specified JPG compression parameter (&qlt=) does not exceed thejpegSize value, the image is returned with &qlt= as defined. Otherwise, &qlt= is gradually decreased until the image fits in the maximum allowed size, or until the system determines it cannot fit and returns an error.

  • As a best practice, set &jpegSize= and add the parameter &qlt= if you are delivering JPG images to devices with limited memory.

Best Practices Summary

As a best practice, to achieve a high image quality and small file size, start with the following combination of parameters: fmt=jpg&qlt=85,0&resMode=sharp2&op_usm=1.75,0.3,2,0

This combination of settings products excellent results under most circumstances.

If the image requires further optimization, gradually fine-tune sharpening (unsharp masking) parameters by starting with a radius set to 0.2 or 0.3. Then, gradually increase the amount from 1.75 to a maximum of 4 (equivalent to 400% in Photoshop). Check to see that the desired result is achieved.

If sharpening results are still not satisfactory, increase the radius in decimal increments. For every decimal increment, restart the amount at 1.75 and gradually increase it to 4. Repeat this process until you achieve the desired result. While the values above are an approach that creative studios have validated, remember that you can start with other values and follow other strategies. Whether the results are satisfactory to you or not is a subjective matter, therefore structured experimentation is key.

As you experiment, you may also find the following general suggestions helpful to optimize your workflow:

  • Try out and test different parameters in real time, either directly on a URL or using the Scene7 Publishing System’s image adjustment functionality which provides real-time previews for adjustment operations.
  • As a best practice, remember that you can group dynamic media image serving commands into an image preset. An image preset is basically URL command macros with custom preset names such as $thumb_low$ and &product_high$. The custom preset name in a URL path makes a call to these presets. Such functionality helps you manage commands and quality settings for different usage patterns of images on your website and shortens the overall length of URLs.
  • AEM also provides more advanced ways to tune image quality, such as applying sharpening images on ingestion. For advanced use cases where this may be an option to further tune and optimize rendering results, Adobe Professional Services can help you with customized insight and best practices.

Lesson 2: Smart Crop

Lesson Context

Smart Crop generates different crop treatments of images when added to a folder configured for Smart Crop. In this lesson, we’ll review some assets that have already been cropped with Smart Crop, and then configure a folder for Smart Crop and add new image assets to use with Smart Crop.

Exercise 2.1: Review Smart Crops

  1. Navigate to the “Summit 2019” folder in Assets; Locate “Smart Crop Examples”; Mouse over the more button and select Smart Crop from the list off options.

  1. Review Smart Crop editing tools. You may edit where the crop is focused by dragging the blue crop box. Click “Save”.

Exercise 2.2: Create Smart Crop Profile

  1. Create a Smart Crop Configuration, assign to a folder and add files into the folder. Create Smart Crop configuration, under Tools (hammer), Assets, Image Profiles

  1. Choose Create. Choose Smart Crop from Type. Use these below values, for example, to generate a configuration that will label the folder

with a helpful name and generate, in this example, 4 different cropped versions of any image added to the folder. NOTE: Don’t forget to add your station number to your profile name to prevent overwriting!

  1. Create a new folder. Select the folder. Choose Properties, Image Profile, Select your Smart Crop Image profile from the list to assign it to the folder.

  2. Open the folder. Add Images to the folder.

  3. Review Smart Crop results.

Lesson 3: Add Dynamic Media to Dynamic Media Component (H1)

Lesson Context

Here, we will explore how to use the built-in Dynamic Media Component on a page created with an AEM Sites. This component leverages Dynamic Media features without the need for coding URLs manually; the Smart Crop profile we set up earlier with our

sample assets will be used here to power a responsive layout for a page.

Exercise 3.1: Add Dynamic Media Component to a page

  1. Open Dynamic Media Demo page; Navigate to Sites, Select DynamicMediaDemo page, Select Edit

  1. Chose Component tool (upper left, middle tool). Drag Dynamic Media component to editable page area.

  1. Switch to Asset Picker. Select an Image Asset and drag into Dynamic Media Component.

  1. Click on image or Component to reveal editing tools.

  1. Select wrench tool, and choose Dynamic Media Settings. Choose Smart Crop option. Click check-mark to Save. Switch to preview mode. Resize Browser window. Notice different crops rendering at different widths.

Next Steps

Now that you are familiar with some of the tools used to optimize image & video delivery, explore additional exciting new features available in Dynamic Media at https:// www.adobe.com/marketing/experience-manager-assets/dynamic-media.html.

If you currently use Dynamic Media Classic and would like to learn more about upgrading to AEM+Dynamic Media please see additional resources at http://exploreadobe.com/dynamic-media-upgrade/