Rendition Selection
The Adaptive Image Servlet will automatically select the most appropriate rendition to display based on the size of the container in which it is displayed. The rendition selection process is as follows.
- The Adaptive Image Servlet reviews at all available renditions of the image asset.
- It selects only those with the same mime/type of the original referenced asset.
- E.g. if the original asset was a PNG, it will only consider PNG renditions.
- Of those renditions it considers the dimensions, and comparing them to the size of the container in which the image should be displayed.
- If the rendition is >= the container size, it is added to a list of candidate renditions.
- If the rendition is < the container size, it is disregarded.
- These criteria ensure that the rendition will not be upscaled, which would impact image quality.
- The Adaptive Image Servlet then picks the rendition with the smallest file size from the candidate list.
Optimizing Rendition Selection
The Adaptive Image Servlet will try to pick the best rendition for the requested image size and type. It’s recommended that DAM renditions and Image component allowed widths are defined in sync so that the Adaptive Image Servlet does as little processing as possible.
This will improve performance and avoid some images not being correctly processed by the underlying image processing library.